mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestPowerManagerCommands.java
@Test
    public void testGetWakeLockByContextNoContexts()
    {
        when(m_PowerManager.getWakeLockContexts()).thenReturn(new HashSet<Class<?>>());
        Set<WakeLock> returnedLocks = m_SUT.getWakeLocksByContext(m_Session, 
                ActiveContextClass.class.getName(), "activeLock1");
        
        assertThat(returnedLocks, notNullValue());
        assertThat(returnedLocks.size(), is(0));
        verify(m_PrintStream).format(anyString(), anyVararg());
    }
/**
     * Verify that with no contexts a null value is returned.
     */
Verify that with no contexts a null value is returned.
Verify that with no contexts a null value is returned .
@Test
    public void testGetWakeLockByContextNoContexts()
    {
        when(m_PowerManager.getWakeLockContexts()).thenReturn(new HashSet<Class<?>>());
        Set<WakeLock> returnedLocks = m_SUT.getWakeLocksByContext(m_Session, 
                ActiveContextClass.class.getName(), "activeLock1");
        assertThat(returnedLocks, notNullValue());
        assertThat(returnedLocks.size(), is(0));
        verify(m_PrintStream).format(anyString(), anyVararg());
    }
@ Test public void testGetWakeLockByContextNoContexts ( ) { when ( m_PowerManager . getWakeLockContexts ( ) ) . thenReturn ( new HashSet < Class < ? > > ( ) ) ; Set < WakeLock > returnedLocks = m_SUT . getWakeLocksByContext ( m_Session , ActiveContextClass . class . getName ( ) , "activeLock1" ) ; assertThat ( returnedLocks , notNullValue ( ) ) ; assertThat ( returnedLocks . size ( ) , is ( 0 ) ) ; verify ( m_PrintStream ) . format ( anyString ( ) , anyVararg ( ) ) ; }
Verify that with no contexts a null value is returned.
Verify that with no contexts a null value is returned .