DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery();
assertEquals(1, deploymentQuery.count());
// there should be one case definition
CaseDefinitionQuery query = engine.getRepositoryService().createCaseDefinitionQuery();
assertEquals(1, query.count());
CaseDefinition caseDefinition = query.singleResult();
assertEquals("Case_1", caseDefinition.getKey());
engine.getRepositoryService().deleteDeployment(deploymentId);
}