mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestPowerManagerCommands.java
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testEnableCommandNoConfigProperties() throws IOException
    {
        when(m_Configuration.getProperties()).thenReturn(null);
        
        m_SUT.enable(m_Session);
        verify(m_ConfigurationAdmin).getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        
        ArgumentCaptor<Dictionary> mapCaptor = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_Configuration).update(mapCaptor.capture());
        
        Dictionary<String, Object> capDict = mapCaptor.getValue();
        assertThat(capDict, notNullValue());
        assertThat((boolean)capDict.get(PlatformPowerManager.CONFIG_PROP_ENABLED), is(true));
    }
/**
     * Verify that the platform power manager can be enabled via the configuration admin service
     * if there is not an existing configuration.
     */
Verify that the platform power manager can be enabled via the configuration admin service
if there is not an existing configuration.
Verify that the platform power manager can be enabled via the configuration admin service if there is not an existing configuration .
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testEnableCommandNoConfigProperties() throws IOException
    {
        when(m_Configuration.getProperties()).thenReturn(null);
        m_SUT.enable(m_Session);
        verify(m_ConfigurationAdmin).getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        ArgumentCaptor<Dictionary> mapCaptor = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_Configuration).update(mapCaptor.capture());
        Dictionary<String, Object> capDict = mapCaptor.getValue();
        assertThat(capDict, notNullValue());
        assertThat((boolean)capDict.get(PlatformPowerManager.CONFIG_PROP_ENABLED), is(true));
    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) @ Test public void testEnableCommandNoConfigProperties ( ) throws IOException { when ( m_Configuration . getProperties ( ) ) . thenReturn ( null ) ; m_SUT . enable ( m_Session ) ; verify ( m_ConfigurationAdmin ) . getConfiguration ( PlatformPowerManager . CONFIG_PID , null ) ; ArgumentCaptor < Dictionary > mapCaptor = ArgumentCaptor . forClass ( Dictionary . class ) ; verify ( m_Configuration ) . update ( mapCaptor . capture ( ) ) ; Dictionary < String , Object > capDict = mapCaptor . getValue ( ) ; assertThat ( capDict , notNullValue ( ) ) ; assertThat ( ( boolean ) capDict . get ( PlatformPowerManager . CONFIG_PROP_ENABLED ) , is ( true ) ) ; }
Verify that the platform power manager can be enabled via the configuration admin service
 if there is not an existing configuration.
Verify that the platform power manager can be enabled via the configuration admin service if there is not an existing configuration .