public void testSetJobPriorityForNonExistingJob() {
   try {
     managementService.setJobPriority("nonExistingJob", 42);
     fail("should not succeed");
   } catch (NotFoundException e) {
     assertTextPresentIgnoreCase("No job found with id 'nonExistingJob'", e.getMessage());
   }
 }
  public void testGetCaseDefinitionByInvalidId() {
    try {
      repositoryService.getCaseDefinition("invalid");
    } catch (NotFoundException e) {
      assertTextPresent("no deployed case definition found with id 'invalid'", e.getMessage());
    }

    try {
      repositoryService.getCaseDefinition(null);
      fail();
    } catch (NotValidException e) {
      assertTextPresent("caseDefinitionId is null", e.getMessage());
    }
  }