mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testExecuteCommandGet() throws IOException, InterruptedException
    {
        //set the value first before retrieving
        SetPanTiltCommand command = SetPanTiltCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).
                setPanTilt(OrientationOffset.newBuilder().
                        setAzimuth(AzimuthDegrees.newBuilder().setValue(20).build()).build()).build();
        
        //send the command
        AssetNamespaceUtils.executeCommand(command, 
                CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_PAN_TILT_COMMAND), 
                testUuid, socket);
 
        ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils.executeCommand(
            GetPanTiltCommand.newBuilder().setBase(BaseTypesGen.Command.getDefaultInstance()).build(), 
            CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.GET_PAN_TILT_COMMAND), testUuid, socket);
        
        assertThat(executeCommandResponse.getResponseType(), is(
                CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_PAN_TILT_RESPONSE)));
        assertThat(executeCommandResponse.getUuid(), is(testUuid));              
        
        GetPanTiltResponse commandResponse = GetPanTiltResponse.parseFrom(executeCommandResponse.getResponse());
        assertThat(commandResponse.getPanTilt().getAzimuth().getValue(), is(20d)); // same as set in set command test
    }
/**
     * Verifies ability to execute a command remotely and get the response.
     * 
     * Test a get command
     * 
     */
Verifies ability to execute a command remotely and get the response.

Test a get command
Verifies ability to execute a command remotely and get the response . Test a get command
@Test
    public final void testExecuteCommandGet() throws IOException, InterruptedException
    {
        SetPanTiltCommand command = SetPanTiltCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).
                setPanTilt(OrientationOffset.newBuilder().
                        setAzimuth(AzimuthDegrees.newBuilder().setValue(20).build()).build()).build();
        AssetNamespaceUtils.executeCommand(command, 
                CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_PAN_TILT_COMMAND), 
                testUuid, socket);
        ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils.executeCommand(
            GetPanTiltCommand.newBuilder().setBase(BaseTypesGen.Command.getDefaultInstance()).build(), 
            CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.GET_PAN_TILT_COMMAND), testUuid, socket);
        assertThat(executeCommandResponse.getResponseType(), is(
                CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_PAN_TILT_RESPONSE)));
        assertThat(executeCommandResponse.getUuid(), is(testUuid));              
        GetPanTiltResponse commandResponse = GetPanTiltResponse.parseFrom(executeCommandResponse.getResponse());
        assertThat(commandResponse.getPanTilt().getAzimuth().getValue(), is(20d)); 
    }
@ Test public final void testExecuteCommandGet ( ) throws IOException , InterruptedException { SetPanTiltCommand command = SetPanTiltCommand . newBuilder ( ) . setBase ( BaseTypesGen . Command . getDefaultInstance ( ) ) . setPanTilt ( OrientationOffset . newBuilder ( ) . setAzimuth ( AzimuthDegrees . newBuilder ( ) . setValue ( 20 ) . build ( ) ) . build ( ) ) . build ( ) ; AssetNamespaceUtils . executeCommand ( command , CommandTypeEnumConverter . convertJavaEnumToProto ( CommandTypeEnum . SET_PAN_TILT_COMMAND ) , testUuid , socket ) ; ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils . executeCommand ( GetPanTiltCommand . newBuilder ( ) . setBase ( BaseTypesGen . Command . getDefaultInstance ( ) ) . build ( ) , CommandTypeEnumConverter . convertJavaEnumToProto ( CommandTypeEnum . GET_PAN_TILT_COMMAND ) , testUuid , socket ) ; assertThat ( executeCommandResponse . getResponseType ( ) , is ( CommandResponseEnumConverter . convertJavaEnumToProto ( CommandResponseEnum . GET_PAN_TILT_RESPONSE ) ) ) ; assertThat ( executeCommandResponse . getUuid ( ) , is ( testUuid ) ) ; GetPanTiltResponse commandResponse = GetPanTiltResponse . parseFrom ( executeCommandResponse . getResponse ( ) ) ; assertThat ( commandResponse . getPanTilt ( ) . getAzimuth ( ) . getValue ( ) , is ( 20d ) ) ; }
Verifies ability to execute a command remotely and get the response.
Verifies ability to execute a command remotely and get the response .
//set the value first before retrieving //send the command // same as set in set command test