@Test
	public void inlineJobDefWithTransition() {
		if (JobParser.SUPPORTS_INLINE_JOB_DEFINITIONS) {
			js = parse("foo bar --aaa=bbb | completed = bar | wibble=wobble");
			JobNode jn = js.getJobNode();
			assertTrue(jn.isJobDescriptor());
			JobDescriptor jd = (JobDescriptor) jn;
			assertTrue(jd.isDefinition());
			JobDefinition jobdef = (JobDefinition) jd;
			assertEquals("foo", jobdef.getJobModuleName());
			assertEquals("bar", jobdef.getJobName());
			ArgumentNode[] args = jobdef.getArguments();
			assertEquals(1, args.length);
			assertEquals("aaa", args[0].getName());
			assertEquals("bbb", args[0].getValue());
			List<Transition> transitions = jd.getTransitions();
			assertEquals(2, transitions.size());
			assertEquals("completed", transitions.get(0).getStateName());
			assertEquals("bar", transitions.get(0).getTargetJobName());
			assertEquals("wibble", transitions.get(1).getStateName());
			assertEquals("wobble", transitions.get(1).getTargetJobName());
		}
		else {
			checkForParseError("foo bar --aaa=bbb | completed = bar | wibble=wobble",
					JobDSLMessage.EXPECTED_FLOW_OR_SPLIT_CHARS, 4, "bar");
		}
	}
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