@Test
public void testApplyInjection() {

    final Capture capture = new Capture();
    expect(mockEncounter.getProvider(ScrapingAwareHelper.class)).
        andReturn(mockProvider);
    mockEncounter.register(isA(InjectionListener.class));
    expectLastCall().andAnswer(new IAnswer<Object>() {
        public Object answer() throws Throwable {
            capture.setCaptured(getCurrentArguments()[0]);
            return null;
        }
    });
    expect(mockProvider.get()).andReturn(mockAwareHelper);
    mockAwareHelper.addListener(mockAwareObject);
    expectLastCall();
    EasyMockUnitils.replay();
    listener.hear(mockTypeLiteral, mockEncounter);
    final InjectionListener<Object> injectionListener =
            capture.getCaptured();
    assertNotNull(listener);
    injectionListener.afterInjection(mockAwareObject);
    injectionListener.afterInjection(this);
}