public void testContextManager() throws Exception {
    final Context managerContext = m_manager.getContainerManagerContext();
    assertNotNull(managerContext);

    final ServiceManager serviceManager = (ServiceManager) managerContext.get(SERVICE_MANAGER);
    assertNotNull(serviceManager);

    final InstrumentManager instrumentManager =
        (InstrumentManager) serviceManager.lookup(InstrumentManager.ROLE);
    assertNotNull(instrumentManager);
    assertSame(m_instrManager, instrumentManager);
  }
  public void setUp() throws Exception {
    FortressConfig config = new FortressConfig(FortressConfig.createDefaultConfig());
    config.setContainerConfiguration("resource://org/apache/avalon/fortress/test/data/test1.xconf");
    config.setLoggerManagerConfiguration(
        "resource://org/apache/avalon/fortress/test/data/test1.xlog");

    m_instrManager = new DefaultInstrumentManagerImpl();
    ContainerUtil.enableLogging(m_instrManager, new ConsoleLogger());
    ContainerUtil.initialize(m_instrManager);
    config.setInstrumentManager(m_instrManager);

    m_manager = new ContextManager(config.getContext(), new ConsoleLogger());
    m_manager.initialize();
  }
 public void tearDown() {
   m_manager.dispose();
 }