@Test
  public void processInstanceWithVariablesTest() throws Exception {

    this.setupDataSource = true;
    this.sessionPersistence = true;
    super.setUp();

    RuntimeEngine runtimeEngine =
        createRuntimeManager("BPMN2-StringStructureRef.bpmn2").getRuntimeEngine(null);
    KieSession ksession = runtimeEngine.getKieSession();

    Map<String, Object> params = new HashMap<String, Object>();
    String val = "initial-val";
    params.put("test", val);
    ProcessInstance processInstance = ksession.startProcess("StructureRef");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);

    Map<String, Object> res = new HashMap<String, Object>();
    res.put("testHT", "test value");
    // ksession.getWorkItemManager().completeWorkItem(workItemHandler.getWorkItem().getId(),
    // res);

    Map<String, String> map = new HashMap<String, String>();
    map.put("test", "initial-val");

    JaxbProcessInstanceWithVariablesResponse jpiwvr =
        new JaxbProcessInstanceWithVariablesResponse(processInstance, map);
    testRoundTrip(jpiwvr);

    JaxbProcessInstanceListResponse jpilp = new JaxbProcessInstanceListResponse();
    List<ProcessInstance> procInstList = new ArrayList<ProcessInstance>();
    procInstList.add(new JaxbProcessInstanceResponse(processInstance));
    jpilp.setResult(procInstList);
    testRoundTrip(jpilp);

    super.tearDown();
    this.setupDataSource = false;
    this.sessionPersistence = false;
  }