mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestPowerManagerCommands.java
@SuppressWarnings("unchecked")
    @Test
    public void testEnableCommandAlreadyEnabled() throws IOException
    {
        Dictionary<String, Object> dict = new Hashtable<>();
        dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, true);
        when(m_Configuration.getProperties()).thenReturn(dict);
        
        m_SUT.enable(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 enabled.%n");
    }
/**
     * Verify that the configuration for the platform power manager is not updated if 
     * the enabled property is already true.
     */
Verify that the configuration for the platform power manager is not updated if
the enabled property is already true.
Verify that the configuration for the platform power manager is not updated if the enabled property is already true .
@SuppressWarnings("unchecked")
    @Test
    public void testEnableCommandAlreadyEnabled() throws IOException
    {
        Dictionary<String, Object> dict = new Hashtable<>();
        dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, true);
        when(m_Configuration.getProperties()).thenReturn(dict);
        m_SUT.enable(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 enabled.%n");
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testEnableCommandAlreadyEnabled ( ) throws IOException { Dictionary < String , Object > dict = new Hashtable < > ( ) ; dict . put ( PlatformPowerManager . CONFIG_PROP_ENABLED , true ) ; when ( m_Configuration . getProperties ( ) ) . thenReturn ( dict ) ; m_SUT . enable ( 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 enabled.%n" ) ; }
Verify that the configuration for the platform power manager is not updated if
 the enabled property is already true.
Verify that the configuration for the platform power manager is not updated if the enabled property is already true .