protected JaxbProcessDefinition convertProcAssetDescToJaxbProcDef(
      ProcessDefinition procAssetDesc) {
    JaxbProcessDefinition jaxbProcDef = new JaxbProcessDefinition();
    jaxbProcDef.setDeploymentId(((ProcessAssetDesc) procAssetDesc).getDeploymentId());
    jaxbProcDef.setForms(((ProcessAssetDesc) procAssetDesc).getForms());
    jaxbProcDef.setId(procAssetDesc.getId());
    jaxbProcDef.setName(procAssetDesc.getName());
    jaxbProcDef.setPackageName(procAssetDesc.getPackageName());
    jaxbProcDef.setVersion(procAssetDesc.getVersion());

    return jaxbProcDef;
  }
  @Test
  public void testHumanTaskProcessBeforeAndAfterUndeploy() throws IOException {

    assertNotNull(deploymentService);

    DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);

    deploymentService.deploy(deploymentUnit);
    units.add(deploymentUnit);

    String processId = "org.jbpm.writedocument";

    ProcessDefinition procDef =
        bpmn2Service.getProcessDefinition(deploymentUnit.getIdentifier(), processId);
    assertNotNull(procDef);

    assertEquals(procDef.getId(), "org.jbpm.writedocument");
    assertEquals(procDef.getName(), "humanTaskSample");
    assertEquals(procDef.getKnowledgeType(), "PROCESS");
    assertEquals(procDef.getPackageName(), "defaultPackage");
    assertEquals(procDef.getType(), "RuleFlow");
    assertEquals(procDef.getVersion(), "1");

    // now let's undeploy the unit
    deploymentService.undeploy(deploymentUnit);

    procDef = bpmn2Service.getProcessDefinition(deploymentUnit.getIdentifier(), processId);
    assertNull(procDef);
  }