### Question:
EventBusTypeListener implements TypeListener { @Override public <I> void hear(final TypeLiteral<I> typeLiteral, final TypeEncounter<I> typeEncounter) { boolean qualifies = false; for (final Method method : typeLiteral.getRawType(). getDeclaredMethods()) { qualifies = method.isAnnotationPresent(Subscribe.class); if (qualifies) { break; } } if (qualifies) { typeEncounter.register(new InjectionListener<I>() { public void afterInjection(final I i) { InjectorHelper.getInjector(). getInstance(EventBus.class).register(i); LOG.info("Subscribed to events {}", i); } }); } }  @Override void hear(final TypeLiteral<I> typeLiteral,
             final TypeEncounter<I> typeEncounter);  }### Answer:
@Test public void testApplyApplicableInjection() { final Capture capture = new Capture(); mockEncounter.register(isA(InjectionListener.class)); expectLastCall().andAnswer(new IAnswer<Object>() { public Object answer() throws Throwable { capture.setCaptured(getCurrentArguments()[0]); return null; } }); expect(mockInjector.getInstance(EventBus.class)). andReturn(mockEventBus); mockEventBus.register(mockSubscriber); EasyMockUnitils.replay(); listener.hear(mockTypeLiteral, mockEncounter); final InjectionListener<Object> injectionListener = capture.getCaptured(); assertNotNull(injectionListener); injectionListener.afterInjection(mockSubscriber); }