.orderByCaseDefinitionVersion().asc()
.orderByCaseDefinitionCategory()
.asc()
.list();
CaseDefinition caseDefinition = caseDefinitions.get(0);
assertEquals("one", caseDefinition.getKey());
assertEquals("One", caseDefinition.getName());
assertTrue(caseDefinition.getId().startsWith("one:1"));
assertEquals("Examples", caseDefinition.getCategory());
assertEquals(1, caseDefinition.getVersion());
assertEquals("org/camunda/bpm/engine/test/repository/one.cmmn", caseDefinition.getResourceName());
assertEquals(deploymentOneId, caseDefinition.getDeploymentId());
caseDefinition = caseDefinitions.get(1);
assertEquals("one", caseDefinition.getKey());
assertEquals("One", caseDefinition.getName());
assertTrue(caseDefinition.getId().startsWith("one:2"));
assertEquals("Examples", caseDefinition.getCategory());
assertEquals(2, caseDefinition.getVersion());
assertEquals("org/camunda/bpm/engine/test/repository/one.cmmn", caseDefinition.getResourceName());
assertEquals(deploymentTwoId, caseDefinition.getDeploymentId());
caseDefinition = caseDefinitions.get(2);
assertEquals("two", caseDefinition.getKey());
assertEquals("Two", caseDefinition.getName());
assertTrue(caseDefinition.getId().startsWith("two:1"));
assertEquals("Examples2", caseDefinition.getCategory());
assertEquals(1, caseDefinition.getVersion());
assertEquals("org/camunda/bpm/engine/test/repository/two.cmmn", caseDefinition.getResourceName());
assertEquals(deploymentOneId, caseDefinition.getDeploymentId());
}