mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetImpl.java
@Test
    public void testOtherCommand()
            throws CommandExecutionException, ValidationFailedException, InterruptedException, IOException
    {
        GetProfilesCommand command = mock(GetProfilesCommand.class);
        GetProfilesResponse response = mock(GetProfilesResponse.class);
        when(m_Proxy.onExecuteCommand(command)).thenReturn(response);
        m_SUT.executeCommand(command);

        verify(m_Proxy).onExecuteCommand(command);
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();

        Map<String, Object> props = new HashMap<>();
        props.put(Asset.EVENT_PROP_ASSET_COMMAND_RESPONSE_TYPE, response.getClass().getName());
        props.put(Asset.EVENT_PROP_ASSET_COMMAND_RESPONSE, response);
        EventAdminVerifier.assertLastEvent(m_EventAdmin, Asset.TOPIC_COMMAND_RESPONSE, props);
    }
/**
     * Verify execute other command works as intended.
     */
Verify execute other command works as intended.
Verify execute other command works as intended .
@Test
    public void testOtherCommand()
            throws CommandExecutionException, ValidationFailedException, InterruptedException, IOException
    {
        GetProfilesCommand command = mock(GetProfilesCommand.class);
        GetProfilesResponse response = mock(GetProfilesResponse.class);
        when(m_Proxy.onExecuteCommand(command)).thenReturn(response);
        m_SUT.executeCommand(command);
        verify(m_Proxy).onExecuteCommand(command);
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
        Map<String, Object> props = new HashMap<>();
        props.put(Asset.EVENT_PROP_ASSET_COMMAND_RESPONSE_TYPE, response.getClass().getName());
        props.put(Asset.EVENT_PROP_ASSET_COMMAND_RESPONSE, response);
        EventAdminVerifier.assertLastEvent(m_EventAdmin, Asset.TOPIC_COMMAND_RESPONSE, props);
    }
@ Test public void testOtherCommand ( ) throws CommandExecutionException , ValidationFailedException , InterruptedException , IOException { GetProfilesCommand command = mock ( GetProfilesCommand . class ) ; GetProfilesResponse response = mock ( GetProfilesResponse . class ) ; when ( m_Proxy . onExecuteCommand ( command ) ) . thenReturn ( response ) ; m_SUT . executeCommand ( command ) ; verify ( m_Proxy ) . onExecuteCommand ( command ) ; verify ( m_WakeLock ) . activate ( ) ; verify ( m_WakeLock ) . cancel ( ) ; Map < String , Object > props = new HashMap < > ( ) ; props . put ( Asset . EVENT_PROP_ASSET_COMMAND_RESPONSE_TYPE , response . getClass ( ) . getName ( ) ) ; props . put ( Asset . EVENT_PROP_ASSET_COMMAND_RESPONSE , response ) ; EventAdminVerifier . assertLastEvent ( m_EventAdmin , Asset . TOPIC_COMMAND_RESPONSE , props ) ; }
Verify execute other command works as intended.
Verify execute other command works as intended .