mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testExecuteCommandGetPosition() throws IOException, InterruptedException
    {
        Coordinates coord = Coordinates.newBuilder().
                setLatitude(LatitudeWgsDegrees.newBuilder().setValue(70.0).build()).
                setLongitude(LongitudeWgsDegrees.newBuilder().setValue(95.6).build()).build();
        
        SetPositionCommand command =  SetPositionCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).setLocation(coord).build();
        //execute set
        AssetNamespaceUtils.executeCommand(command, 
                CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_POSITION_COMMAND), 
                testUuid, socket);
        
        //verify we are able to execute a get position
        ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils.
                executeCommand(GetPositionCommand.newBuilder().setBase(
                        BaseTypesGen.Command.getDefaultInstance()).build(), 
                        CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.GET_POSITION_COMMAND),
                        testUuid, socket);
        
        assertThat(executeCommandResponse.getResponseType(), is(
                CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_POSITION_RESPONSE)));
        assertThat(executeCommandResponse.getUuid(), is(testUuid));
        
        GetPositionResponse commandResponse = GetPositionResponse.parseFrom(executeCommandResponse.getResponse());
        assertThat(commandResponse, is(notNullValue()));
        
        Coordinates coords = commandResponse.getLocation();
        
        assertThat(coords.getLatitude().getValue(), is(70.0));
    }
/**
     * 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 testExecuteCommandGetPosition() throws IOException, InterruptedException
    {
        Coordinates coord = Coordinates.newBuilder().
                setLatitude(LatitudeWgsDegrees.newBuilder().setValue(70.0).build()).
                setLongitude(LongitudeWgsDegrees.newBuilder().setValue(95.6).build()).build();
        SetPositionCommand command =  SetPositionCommand.newBuilder().
                setBase(BaseTypesGen.Command.getDefaultInstance()).setLocation(coord).build();
        AssetNamespaceUtils.executeCommand(command, 
                CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.SET_POSITION_COMMAND), 
                testUuid, socket);
        ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils.
                executeCommand(GetPositionCommand.newBuilder().setBase(
                        BaseTypesGen.Command.getDefaultInstance()).build(), 
                        CommandTypeEnumConverter.convertJavaEnumToProto(CommandTypeEnum.GET_POSITION_COMMAND),
                        testUuid, socket);
        assertThat(executeCommandResponse.getResponseType(), is(
                CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_POSITION_RESPONSE)));
        assertThat(executeCommandResponse.getUuid(), is(testUuid));
        GetPositionResponse commandResponse = GetPositionResponse.parseFrom(executeCommandResponse.getResponse());
        assertThat(commandResponse, is(notNullValue()));
        Coordinates coords = commandResponse.getLocation();
        assertThat(coords.getLatitude().getValue(), is(70.0));
    }
@ Test public final void testExecuteCommandGetPosition ( ) throws IOException , InterruptedException { Coordinates coord = Coordinates . newBuilder ( ) . setLatitude ( LatitudeWgsDegrees . newBuilder ( ) . setValue ( 70.0 ) . build ( ) ) . setLongitude ( LongitudeWgsDegrees . newBuilder ( ) . setValue ( 95.6 ) . build ( ) ) . build ( ) ; SetPositionCommand command = SetPositionCommand . newBuilder ( ) . setBase ( BaseTypesGen . Command . getDefaultInstance ( ) ) . setLocation ( coord ) . build ( ) ; AssetNamespaceUtils . executeCommand ( command , CommandTypeEnumConverter . convertJavaEnumToProto ( CommandTypeEnum . SET_POSITION_COMMAND ) , testUuid , socket ) ; ExecuteCommandResponseData executeCommandResponse = AssetNamespaceUtils . executeCommand ( GetPositionCommand . newBuilder ( ) . setBase ( BaseTypesGen . Command . getDefaultInstance ( ) ) . build ( ) , CommandTypeEnumConverter . convertJavaEnumToProto ( CommandTypeEnum . GET_POSITION_COMMAND ) , testUuid , socket ) ; assertThat ( executeCommandResponse . getResponseType ( ) , is ( CommandResponseEnumConverter . convertJavaEnumToProto ( CommandResponseEnum . GET_POSITION_RESPONSE ) ) ) ; assertThat ( executeCommandResponse . getUuid ( ) , is ( testUuid ) ) ; GetPositionResponse commandResponse = GetPositionResponse . parseFrom ( executeCommandResponse . getResponse ( ) ) ; assertThat ( commandResponse , is ( notNullValue ( ) ) ) ; Coordinates coords = commandResponse . getLocation ( ) ; assertThat ( coords . getLatitude ( ) . getValue ( ) , is ( 70.0 ) ) ; }
Verifies ability to execute a command remotely and get the response.
Verifies ability to execute a command remotely and get the response .
//execute set //verify we are able to execute a get position