@Test
	public void toGraphWithTransition2() {
		// The target transition node is not elsewhere on the list
		js = parse("<foo | completed=hoo & bar> || boo || goo");
		checkDSLToGraphAndBackToDSL("<foo | completed = hoo & bar> || boo || goo");
		// {"nodes":[{"id":"0","name":"START"},{"id":"1","name":"foo"},{"id":"2","name":"hoo"},
		//           {"id":"3","name":"bar"},{"id":"4","name":"boo"},{"id":"5","name":"goo"},{"id":"6","name":"END"}],
		//  "links":[{"from":"0","to":"1"},{"from":"1","to":"2","properties":{"transitionName":"completed"}},
		//           {"from":"0","to":"3"},{"from":"2","to":"4"},{"from":"3","to":"4"},{"from":"4","to":"5"},
		//           {"from":"5","to":"6"}]}
		assertEquals(
				toExpectedGraph(
						"n:0:START,n:1:foo,n:2:hoo,n:3:bar,n:4:boo,n:5:goo,n:6:END,l:0:1,l:1:2:transitionName=completed,l:0:3,l:2:4,l:3:4,l:4:5,l:5:6"),
				js.toGraph().toJSON());
	}
Parse job specifications and verify either the correct abstract syntax tree is produced or the current exception comes out.
The parser does no semantic validation, it is purely syntax checking.

@author Andy Clement
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/job/dsl/JobParserTests.java