@Test
	public void toGraph$FAIL() {
		js = parse("foo | oranges=$FAIL");

		// AST creation (and DSL printing from it)
		assertEquals("foo | oranges = $FAIL", js.stringify());

		// {"nodes":[{"id":"0","name":"START"},{"id":"1","name":"foo"},{"id":"2","name":"FAIL"},
		//           {"id":"3","name":"END"}],
		//  "links":[{"from":"0","to":"1"},{"from":"1","to":"2","properties":{"transitionName":"oranges"}},
		//           {"from":"2","to":"3"}]}
		// Graph creation
		assertEquals(toExpectedGraph("n:0:START,n:1:foo,n:2:FAIL,n:3:END,l:0:1,l:1:2:transitionName=oranges,l:2:3"),
				js.toGraph().toJSON());

		// Graph to DSL
		checkDSLToGraphAndBackToDSL("foo | oranges = $FAIL");

		// XML creation
		assertEquals(loadXml("fail1"), 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