@Test
public void should_match_by_name_or_class() {

	//given
	final String serviceMock = "mock";
	final String otherServiceMock = "other mock";
	final DoubleDefinition serviceDefinition = doubleDefinition(Service.class, serviceMock);
	final DoubleDefinition otherServiceDefinition = doubleDefinition(OtherService.class, otherServiceMock);
	//when
	final DoubleSearch search = new DoubleSearch(asList(
			serviceDefinition,
			otherServiceDefinition));
	//expect
	assertTrue(search.containsAnyDoubleMatching(serviceMock, Service.class));
	assertTrue(search.containsAnyDoubleMatching(serviceMock, OtherService.class));
	assertTrue(search.containsAnyDoubleMatching(otherServiceMock, OtherService.class));
	assertTrue(search.containsAnyDoubleMatching(otherServiceMock, Service.class));
}