@Test
public void addsLifeCycleComponentInApplicationContext() throws Exception {

    Object instance = new Object();
    when(constructorDescriptor.createInstance(applicationContext)).thenReturn(instance);
    perRequestObjectFactory.getInstance(applicationContext);
    assertEquals(1, lifecycleComponents.size());
    assertSame(instance, lifecycleComponents.get(0).getComponent());
}