@Test
public void testFailedOperationAndErrors() throws Exception {

  String templateName = "templateFailed";
  String templateContent = null;
  String result = service.applyTemplate(templateName, templateContent, workflowInstance);
  Assert.assertEquals("Workflow failed in operation: operation1, "
          + "Workflow errors: error in operation1 error in operation2 ", result);
}