### Question:
SubscribeAnnotationFinder implements ListenerFinderStrategy { @Override public List<EventListener> resolve(Object o) { final ArrayList<EventListener> listeners = new ArrayList<>(); for (Method method : ClassReflection.getDeclaredMethods(o.getClass())) { if (method.isAnnotationPresent(Subscribe.class)) { final Annotation declaredAnnotation = method.getDeclaredAnnotation(Subscribe.class); if (declaredAnnotation != null) { final Subscribe subscribe = declaredAnnotation.getAnnotation(Subscribe.class); listeners.add(new EventListener(o, method, subscribe.priority(), subscribe.ignoreCancelledEvents())); } } } return listeners; }  @Override /** Find all listeners in o based on @Subscribe annotation and return as EventListeners. */ List<EventListener> resolve(Object o);  }### Answer:
@Test public void FindListeners_MultipleListeners_ResolvesAllListeners() { List<EventListener> listeners = new SubscribeAnnotationFinder().resolve(new SimpleEntitySystem()); assertEquals(2, listeners.size()); }
@Test public void FindListeners_NoListeners_EmptyList() { List<EventListener> listeners = new SubscribeAnnotationFinder().resolve(new Object()); assertTrue(listeners.isEmpty()); }