@Test
	public void toGraph$END2() {
		js = parse("aaa | foo = $END | B = bbb | '*' = ccc || bbb || ccc");

		// AST creation (and DSL printing from it)
		assertEquals("aaa | foo = $END | B = bbb | '*' = ccc || bbb || ccc", js.stringify());

		// {"nodes":[{"id":"0","name":"START"},{"id":"1","name":"aaa"},{"id":"3","name":"bbb"},{"id":"4","name":"ccc"},
		//           {"id":"5","name":"END"}],
		//  "links":[{"from":"0","to":"1"},{"from":"1","to":"5","properties":{"transitionName":"foo"}},
		//           {"from":"1","to":"3","properties":{"transitionName":"B"}},
		//           {"from":"1","to":"4","properties":{"transitionName":"'*'"}},
		//           {"from":"3","to":"4"},{"from":"4","to":"5"}]}
		// Graph creation
		assertEquals(
				toExpectedGraph("n:0:START,n:1:aaa,n:3:bbb,n:4:ccc,n:5:END," +
						"l:0:1,l:1:5:transitionName=foo,l:1:3:transitionName=B,l:1:4:transitionName='*',l:3:4,l:4:5"),
				js.toGraph().toJSON());

		// Graph to DSL
		checkDSLToGraphAndBackToDSL("aaa | foo = $END | B = bbb | '*' = ccc || bbb || ccc");

		// toXML
		assertEquals(loadXml("end2"), js.toXML("test1", true));
	}
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