### Question:
AnnotationChecker { public boolean isMyComponent() { return instance.isAnnotationPresent(MyComponent.class); } AnnotationChecker(Class<?> instance); boolean isMyComponent(); List<Method> getAutoWireMethods(); List<Field> getAutoWireFields();  }### Answer:
@Test public void testIsAnnotatedWithMyComponent() { final AnnotationChecker instance = new AnnotationChecker( ClassWithAttributes.class); assertTrue(instance.isMyComponent()); }
@Test public void testIsNotAnnotatedWithMyComponent() { assertFalse(new AnnotationChecker(String.class).isMyComponent()); }