mil.dod.th.ose.logging/test/mil/dod/th/ose/logging/TestEventLogger.java
@SuppressWarnings("unchecked")
    @Test
    public void testActivationDisabled()
    {
        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(EventLogger.LOG_EVENTS_ENABLED_PROPERTY)).thenReturn("false");
        
        //replay, first with prop not set all
        m_SUT.activate(context);
        
        //verify all events are registered for
        verify(context, never()).registerService(eq(EventHandler.class), Mockito.any(EventHandler.class), 
                Mockito.any(Dictionary.class));
        
        // just make sure deactivate works in this case.
        m_SUT.deactivate();
    }
/**
     * Verify that an EventHandler is not registered as the framework property is set to disabled.
     * 
     * Test deactivation if property is disabled.
     */
Verify that an EventHandler is not registered as the framework property is set to disabled.

Test deactivation if property is disabled.
Verify that an EventHandler is not registered as the framework property is set to disabled . Test deactivation if property is disabled .
@SuppressWarnings("unchecked")
    @Test
    public void testActivationDisabled()
    {
        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(EventLogger.LOG_EVENTS_ENABLED_PROPERTY)).thenReturn("false");
        m_SUT.activate(context);
        verify(context, never()).registerService(eq(EventHandler.class), Mockito.any(EventHandler.class), 
                Mockito.any(Dictionary.class));
        m_SUT.deactivate();
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testActivationDisabled ( ) { BundleContext context = mock ( BundleContext . class ) ; when ( context . getProperty ( EventLogger . LOG_EVENTS_ENABLED_PROPERTY ) ) . thenReturn ( "false" ) ; m_SUT . activate ( context ) ; verify ( context , never ( ) ) . registerService ( eq ( EventHandler . class ) , Mockito . any ( EventHandler . class ) , Mockito . any ( Dictionary . class ) ) ; m_SUT . deactivate ( ) ; }
Verify that an EventHandler is not registered as the framework property is set to disabled.
Verify that an EventHandler is not registered as the framework property is set to disabled .
//replay, first with prop not set all //verify all events are registered for // just make sure deactivate works in this case.