@Test
public void should_definition_by_class_only_when_single_definition_present() {

	//given
	final ApplicationContext appContext = buildAppContext(Stream.of(bean("string", "any bean")));
	final BeanDefinitionFinder definitionFinder = new BeanDefinitionFinder(appContext, emptyDoubleRegistry());
	//when
	final Optional<BeanDefinition> definition = definitionFinder.tryToFindSingleBeanDefinition(String.class);
	//then
	assertTrue(definition.isPresent());
}