@Test public void testAnnotatedBeanDiscovery(Plant plant, Tree tree) { ClassicDecorator.reset(); plant.methodToBeDecorated(); assertEquals(1, ClassicDecorator.called); tree.methodToBeDecorated(); assertEquals(1, ClassicDecorator.called); }
@Test public void testAllBeanDiscovery(Cat cat, Dog dog) { ClassicDecorator.reset(); cat.methodToBeDecorated(); assertEquals(1, ClassicDecorator.called); dog.methodToBeDecorated(); assertEquals(1, ClassicDecorator.called); }