@Before
	public void before() {
		ModuleDefinition moduleJobDefinition = TestModuleDefinitions.dummy("job", ModuleType.job);
		ArrayList<ModuleDefinition> moduleDefinitions = new ArrayList<ModuleDefinition>();
		moduleDefinitions.add(moduleJobDefinition);
		when(moduleRegistry.findDefinitions("job")).thenReturn(moduleDefinitions);
		when(moduleRegistry.findDefinitions("job1")).thenReturn(moduleDefinitions);
		when(moduleRegistry.findDefinitions("job2")).thenReturn(moduleDefinitions);
		when(moduleRegistry.findDefinition("job1", ModuleType.job)).thenReturn(moduleJobDefinition);
		when(moduleRegistry.findDefinition("job2", ModuleType.job)).thenReturn(moduleJobDefinition);
		when(moduleRegistry.findDefinition("job", ModuleType.job)).thenReturn(moduleJobDefinition);
		when(jobLocator.getJobNames()).thenReturn(Arrays.asList(new String[] {}));
		ModuleDefinition any = Mockito.any();
		when(writeableModuleRegistry.registerNew(any)).thenReturn(true);
	}
Tests REST compliance of jobs-related endpoints.

@author Glenn Renfro
@author Ilayaperumal Gopinathan
@author Mark Fisher
@author Florent Biville
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/JobsControllerIntegrationTests.java