@Test
public void should_throw_exception_when_multiple_definitions_found_by_name_and_class() {

	//given
	final String mockName = "mock";
	final Class<?> mockClass = Service.class;
	final DoubleSearch search = new DoubleSearch(asList(
			doubleDefinition(mockClass, mockName),
			doubleDefinition(mockClass, mockName)));
	exception.expect(IllegalStateException.class);
	exception.expectMessage(Matchers.allOf(
			startsWith(MISSING_DOUBLE_EXCEPTION_PREFIX),
			containsString(MULTIPLE_DOUBLES_EXCEPTION_MESSAGE)));
	//when
	search.findOneDefinition(mockName, Service.class);
}