mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestPowerManagerCommands.java
@SuppressWarnings({"unchecked"})
    @Test
    public void testDisableCommandAlreadyDisabled() throws IOException
    {
        Dictionary<String, Object> dict = new Hashtable<>();
        dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, false);
        when(m_Configuration.getProperties()).thenReturn(dict);
        
        m_SUT.disable(m_Session);
        verify(m_ConfigurationAdmin).getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        
        verify(m_Configuration, never()).update(Mockito.any(Dictionary.class));
        
        verify(m_PrintStream).format("The PlatformPowerManager is already disabled.%n");
    }
/**
     * Verify that the configuration is not updated if the platform power manager is already disabled.
     */
Verify that the configuration is not updated if the platform power manager is already disabled.
Verify that the configuration is not updated if the platform power manager is already disabled .
@SuppressWarnings({"unchecked"})
    @Test
    public void testDisableCommandAlreadyDisabled() throws IOException
    {
        Dictionary<String, Object> dict = new Hashtable<>();
        dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, false);
        when(m_Configuration.getProperties()).thenReturn(dict);
        m_SUT.disable(m_Session);
        verify(m_ConfigurationAdmin).getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        verify(m_Configuration, never()).update(Mockito.any(Dictionary.class));
        verify(m_PrintStream).format("The PlatformPowerManager is already disabled.%n");
    }
@ SuppressWarnings ( { "unchecked" } ) @ Test public void testDisableCommandAlreadyDisabled ( ) throws IOException { Dictionary < String , Object > dict = new Hashtable < > ( ) ; dict . put ( PlatformPowerManager . CONFIG_PROP_ENABLED , false ) ; when ( m_Configuration . getProperties ( ) ) . thenReturn ( dict ) ; m_SUT . disable ( m_Session ) ; verify ( m_ConfigurationAdmin ) . getConfiguration ( PlatformPowerManager . CONFIG_PID , null ) ; verify ( m_Configuration , never ( ) ) . update ( Mockito . any ( Dictionary . class ) ) ; verify ( m_PrintStream ) . format ( "The PlatformPowerManager is already disabled.%n" ) ; }
Verify that the configuration is not updated if the platform power manager is already disabled.
Verify that the configuration is not updated if the platform power manager is already disabled .