mil.dod.th.ose.logging/test/mil/dod/th/ose/logging/TestEventLogger.java
@Test
    public void testDeactivation()
    {
        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(EventLogger.LOG_EVENTS_ENABLED_PROPERTY)).thenReturn("true");
        ServiceRegistration<EventHandler> reg = 
                BundleContextMocker.stubServiceRegistration(context, EventHandler.class);
        
        //replay
        m_SUT.activate(context);
        m_SUT.deactivate();
        
        verify(reg).unregister();
    }
/**
     * Verify that an EventHandler is unregistered.
     */
Verify that an EventHandler is unregistered.
Verify that an EventHandler is unregistered .
@Test
    public void testDeactivation()
    {
        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(EventLogger.LOG_EVENTS_ENABLED_PROPERTY)).thenReturn("true");
        ServiceRegistration<EventHandler> reg = 
                BundleContextMocker.stubServiceRegistration(context, EventHandler.class);
        m_SUT.activate(context);
        m_SUT.deactivate();
        verify(reg).unregister();
    }
@ Test public void testDeactivation ( ) { BundleContext context = mock ( BundleContext . class ) ; when ( context . getProperty ( EventLogger . LOG_EVENTS_ENABLED_PROPERTY ) ) . thenReturn ( "true" ) ; ServiceRegistration < EventHandler > reg = BundleContextMocker . stubServiceRegistration ( context , EventHandler . class ) ; m_SUT . activate ( context ) ; m_SUT . deactivate ( ) ; verify ( reg ) . unregister ( ) ; }
Verify that an EventHandler is unregistered.
Verify that an EventHandler is unregistered .
//replay