try {
invokeForkJoin(parser, def);
fail("Expected to catch an exception but did not encounter any");
} catch (Exception ex) {
WorkflowException we = (WorkflowException) ex.getCause();
assertEquals(ErrorCode.E0737, we.getErrorCode());
// Make sure the message contains the nodes and type involved in the invalid transition to end
assertTrue(we.getMessage().contains("three"));
assertTrue(we.getMessage().contains("node [end]"));
assertTrue(we.getMessage().contains("type [end]"));
}
}