}
@Test
public void shouldBindToTheScopedContext() throws Exception
{
ManagerImpl manager = ManagerBuilder.from()
.context(SuiteContextImpl.class)
.context(ClassContextImpl.class).create();
SuiteContext suiteContext = manager.getContext(SuiteContext.class);
ClassContext classContext = manager.getContext(ClassContext.class);
try
{
suiteContext.activate();
classContext.activate(this.getClass());
Object testObject = new Object();
manager.bind(SuiteScoped.class, Object.class, testObject);
Assert.assertEquals(
"Verify value was bound to the correct context",
testObject,
suiteContext.getObjectStore().get(Object.class));