mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testExecuteCommandErrorResponse() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        
        // set to value out of range
        SetPanTiltCommand command = SetPanTiltCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).
                setPanTilt(OrientationOffset.newBuilder().
                        setAzimuth(AzimuthDegrees.newBuilder().setValue(90).build()).build()).build();
        
        //Build get status request message
        ExecuteCommandRequestData request = ExecuteCommandRequestData.newBuilder()
                .setUuid(testUuid)
                .setCommandType(CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_PAN_TILT_COMMAND))
                .setCommand(command.toByteString())
                .build();    
        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.ExecuteCommandRequest, request);        
        message.writeDelimitedTo(socket.getOutputStream());
        
        //listen for messages for a specific time interval
        listener.waitForMessage(Namespace.Base, BaseMessageType.GenericErrorResponse, 600);  
    }
/**
     * Verifies ability to execute a command remotely and get the response.
     * 
     * Test a command that will send an error response.
     */
Verifies ability to execute a command remotely and get the response.

Test a command that will send an error response.
Verifies ability to execute a command remotely and get the response . Test a command that will send an error response .
@Test
    public final void testExecuteCommandErrorResponse() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        SetPanTiltCommand command = SetPanTiltCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).
                setPanTilt(OrientationOffset.newBuilder().
                        setAzimuth(AzimuthDegrees.newBuilder().setValue(90).build()).build()).build();
        ExecuteCommandRequestData request = ExecuteCommandRequestData.newBuilder()
                .setUuid(testUuid)
                .setCommandType(CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_PAN_TILT_COMMAND))
                .setCommand(command.toByteString())
                .build();    
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.ExecuteCommandRequest, request);        
        message.writeDelimitedTo(socket.getOutputStream());
        listener.waitForMessage(Namespace.Base, BaseMessageType.GenericErrorResponse, 600);  
    }
@ Test public final void testExecuteCommandErrorResponse ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; SetPanTiltCommand command = SetPanTiltCommand . newBuilder ( ) . setBase ( BaseTypesGen . Command . getDefaultInstance ( ) ) . setPanTilt ( OrientationOffset . newBuilder ( ) . setAzimuth ( AzimuthDegrees . newBuilder ( ) . setValue ( 90 ) . build ( ) ) . build ( ) ) . build ( ) ; ExecuteCommandRequestData request = ExecuteCommandRequestData . newBuilder ( ) . setUuid ( testUuid ) . setCommandType ( CommandTypeEnumConverter . convertJavaEnumToProto ( CommandTypeEnum . SET_PAN_TILT_COMMAND ) ) . setCommand ( command . toByteString ( ) ) . build ( ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetMessage ( AssetMessageType . ExecuteCommandRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; listener . waitForMessage ( Namespace . Base , BaseMessageType . GenericErrorResponse , 600 ) ; }
Verifies ability to execute a command remotely and get the response.
Verifies ability to execute a command remotely and get the response .
// set to value out of range //Build get status request message //listen for messages for a specific time interval