@Test
public void should_detect_when_has_single_bean_of_type() {

	//given
	class Bean1 {}
	class Bean2 {}
	final ApplicationContext parentContext = buildAppContext(Stream.of(bean("bean1", new Bean1())));
	final ApplicationContext ctx = buildAppContext(parentContext, Stream.of(bean("bean2", new Bean2())));
	final ApplicationContextWalker walker = new ApplicationContextWalker(ctx);
	//expect
	assertTrue(walker.hasOnlyOneBeanOfClass(Bean1.class));
	assertTrue(walker.hasOnlyOneBeanOfClass(Bean2.class));
}