@Test
public void testGetProcessDefinitions() {

    Collection<ProcessDefinition> processes = caseRuntimeDataService.getProcessDefinitions(new QueryContext());
    assertNotNull(processes);
    assertEquals(2, processes.size());
    Map<String, ProcessDefinition> mappedProcesses = mapProcesses(processes);
    assertTrue(mappedProcesses.containsKey("UserTask"));
    assertTrue(mappedProcesses.containsKey("DataVerification"));
    processes = caseRuntimeDataService.getProcessDefinitions("User", new QueryContext());
    assertNotNull(processes);
    assertEquals(1,
            processes.size());
    mappedProcesses = mapProcesses(processes);
    assertTrue(mappedProcesses.containsKey("UserTask"));
    processes = caseRuntimeDataService.getProcessDefinitionsByDeployment(deploymentUnit.getIdentifier(), new QueryContext());
    assertNotNull(processes);
    assertEquals(2, processes.size());
    mappedProcesses = mapProcesses(processes);
    assertTrue(mappedProcesses.containsKey("UserTask"));
    assertTrue(mappedProcesses.containsKey("DataVerification"));
}