public void testInvalidProcessDefinition() {
   try {
     String resource =
         TestHelper.getBpmnProcessDefinitionResource(getClass(), "testInvalidProcessDefinition");
     repositoryService.createDeployment().name(resource).addClasspathResource(resource).deploy();
     fail();
   } catch (ProcessEngineException e) {
     assertTextPresent("cvc-complex-type.3.2.2:", e.getMessage());
     assertTextPresent("invalidAttribute", e.getMessage());
     assertTextPresent("process", e.getMessage());
   }
 }
 public void testInvalidSubProcessWithTimerStartEvent() {
   try {
     String resource =
         TestHelper.getBpmnProcessDefinitionResource(
             getClass(), "testInvalidSubProcessWithTimerStartEvent");
     repositoryService.createDeployment().name(resource).addClasspathResource(resource).deploy();
     fail(
         "Exception expected: Process definition could be parsed, although the sub process contains a timer start event.");
   } catch (ProcessEngineException e) {
     assertTextPresent(
         "timerEventDefinition is not allowed on start event within a subprocess", e.getMessage());
   }
 }
 public void testInvalidSubProcessWithMessageStartEvent() {
   try {
     String resource =
         TestHelper.getBpmnProcessDefinitionResource(
             getClass(), "testInvalidSubProcessWithMessageStartEvent");
     repositoryService.createDeployment().name(resource).addClasspathResource(resource).deploy();
     fail(
         "Process definition could be parsed, although the sub process contains not a blanco start event.");
   } catch (ProcessEngineException e) {
     assertTextPresent(
         "messageEventDefinition only allowed on start event if subprocess is an event subprocess",
         e.getMessage());
   }
 }