mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/pm/TestWakeLockImpl.java
@Test
    public void testLogTracing()
    {
        m_SUT.activate();
        verify(m_Logging, never()).debug(anyString(), anyVararg());

        when(m_Context.getProperty(WakeLockImpl.WAKELOCK_TRACE_PROPERTY)).thenReturn("true");
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(WakeLockImpl.COMPONENT_PROP_ID, TEST_ID);
        props.put(WakeLockImpl.COMPONENT_PROP_CONTEXT, TestContext.class);
        props.put(WakeLockImpl.COMPONENT_PROP_POWER_MGR, m_PowerInternal);
        m_SUT.activateInstance(m_Context, props);

        m_SUT.activate();
        verify(m_Logging).debug(anyString(), anyVararg());
    }
/**
     * Verify that wake lock log tracing can be enabled.
     */
Verify that wake lock log tracing can be enabled.
Verify that wake lock log tracing can be enabled .
@Test
    public void testLogTracing()
    {
        m_SUT.activate();
        verify(m_Logging, never()).debug(anyString(), anyVararg());
        when(m_Context.getProperty(WakeLockImpl.WAKELOCK_TRACE_PROPERTY)).thenReturn("true");
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(WakeLockImpl.COMPONENT_PROP_ID, TEST_ID);
        props.put(WakeLockImpl.COMPONENT_PROP_CONTEXT, TestContext.class);
        props.put(WakeLockImpl.COMPONENT_PROP_POWER_MGR, m_PowerInternal);
        m_SUT.activateInstance(m_Context, props);
        m_SUT.activate();
        verify(m_Logging).debug(anyString(), anyVararg());
    }
@ Test public void testLogTracing ( ) { m_SUT . activate ( ) ; verify ( m_Logging , never ( ) ) . debug ( anyString ( ) , anyVararg ( ) ) ; when ( m_Context . getProperty ( WakeLockImpl . WAKELOCK_TRACE_PROPERTY ) ) . thenReturn ( "true" ) ; Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( WakeLockImpl . COMPONENT_PROP_ID , TEST_ID ) ; props . put ( WakeLockImpl . COMPONENT_PROP_CONTEXT , TestContext . class ) ; props . put ( WakeLockImpl . COMPONENT_PROP_POWER_MGR , m_PowerInternal ) ; m_SUT . activateInstance ( m_Context , props ) ; m_SUT . activate ( ) ; verify ( m_Logging ) . debug ( anyString ( ) , anyVararg ( ) ) ; }
Verify that wake lock log tracing can be enabled.
Verify that wake lock log tracing can be enabled .