@Bean
	public ModuleRegistry moduleRegistry() {
		ModuleRegistry registry = mock(ModuleRegistry.class);
		setupMockFindsForSource(registry);
		setupMockFindsForSink(registry);
		setupMockFindsForProcessor(registry);
		setupMockFindsForJobs(registry);

		when(registry.findDefinition("bart", ModuleType.source)).thenReturn(TestModuleDefinitions.dummy("bart",
				ModuleType.source));
		when(registry.findDefinition("foo", ModuleType.source)).thenReturn(TestModuleDefinitions.dummy("foo",
				ModuleType.source));
		when(registry.findDefinition("boo", ModuleType.source)).thenReturn(TestModuleDefinitions.dummy("boo",
				ModuleType.source));
		when(registry.findDefinition("http", ModuleType.source)).thenReturn(TestModuleDefinitions.dummy("http",
				ModuleType.source));

		when(registry.findDefinition("boot", ModuleType.sink)).thenReturn(TestModuleDefinitions.dummy("boot",
				ModuleType.sink));
		when(registry.findDefinition("bar", ModuleType.sink)).thenReturn(TestModuleDefinitions.dummy("bar",
				ModuleType.sink));
		when(registry.findDefinition("badLog", ModuleType.sink)).thenReturn(TestModuleDefinitions.dummy("badLog",
				ModuleType.sink));
		when(registry.findDefinition("file", ModuleType.sink)).thenReturn(TestModuleDefinitions.dummy("file",
				ModuleType.sink));

		when(registry.findDefinition("job", ModuleType.job)).thenReturn(TestModuleDefinitions.dummy("job",
				ModuleType.job));

		when(registry.findDefinition("aaak", ModuleType.processor)).thenReturn(TestModuleDefinitions.dummy("aaak",
				ModuleType.processor));
		when(registry.findDefinition("goo", ModuleType.processor)).thenReturn(TestModuleDefinitions.dummy("goo",
				ModuleType.processor));
		when(registry.findDefinition("blah", ModuleType.processor)).thenReturn(TestModuleDefinitions.dummy("blah",
				ModuleType.processor));
		when(registry.findDefinition("filter", ModuleType.processor)).thenReturn(TestModuleDefinitions.dummy("filter",
				ModuleType.processor));

		return registry;
	}
@author Mark Fisher
@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/stream/XDStreamParserTests.java