ContextFactory.initRequestContext(null);
ContextFactory.initSessionContext(session);
Assert.assertEquals(2, comps.size());
UserComponent userComponent = (UserComponent) ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());
userComponent.setName("Gurkan");
userComponent.setSurname("Erdogdu");
Assert.assertNotNull(userComponent);
Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), new CreationalContextImpl());
Assert.assertNotNull(object);
Assert.assertTrue(object instanceof ContainUserComponent);
ContainUserComponent uc = (ContainUserComponent) object;
Assert.assertNotNull(uc.echo());
Assert.assertEquals(uc.echo(), userComponent.getName() + " " + userComponent.getSurname());
ContextFactory.destroyRequestContext(null);
ContextFactory.destroySessionContext(session);
}