.createDeployment()
.addClasspathResource("org/camunda/bpm/engine/test/api/repository/second-process.bpmn20.xml")
.deploy()
.getId();
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
query
.processDefinitionNameLike("%Test Process")
.latestVersion();
verifyQueryResults(query, 1);
ProcessDefinition result = query.singleResult();
assertEquals("Second Test Process", result.getName());
assertEquals(2, result.getVersion());
query
.processDefinitionNameLike("%Test%")
.latestVersion();
verifyQueryResults(query, 1);
result = query.singleResult();
assertEquals("Second Test Process", result.getName());
assertEquals(2, result.getVersion());
query
.processDefinitionNameLike("Second%")
.latestVersion();
result = query.singleResult();
assertEquals("Second Test Process", result.getName());
assertEquals(2, result.getVersion());
repositoryService.deleteDeployment(firstDeployment, true);