@Test
	public void testWhenMatching() {
		SingletonModuleRegistry mr = new SingletonModuleRegistry(processor, "foo");

		assertThat(mr.findDefinition("foo", processor), module("foo", processor));
		assertThat(mr.findDefinitions("foo"), contains(module("foo", processor)));
		assertThat(mr.findDefinitions(processor), contains(module("foo", processor)));
		assertThat(mr.findDefinitions(), contains(module("foo", processor)));

	}
Tests for {@link SingletonModuleRegistry}.

@author Eric Bottard
@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/module/SingletonModuleRegistryTests.java