mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testCaptureData_UuidOnlyResponse() throws IOException, AssetException, ObjectConverterException, 
        InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        
        // build request
        CaptureDataRequestData request = CaptureDataRequestData.newBuilder()
                .setUuid(testUuid)
                .setObservationFormat(RemoteTypesGen.LexiconFormat.Enum.UUID_ONLY)
                .build();        
        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.CaptureDataRequest, request);         
        message.writeDelimitedTo(socket.getOutputStream());
        
        //listen for messages for a specific time interval
        Message responseRcvd = listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.CaptureDataResponse, 1200);  
        AssetNamespace response = (AssetNamespace)responseRcvd;
        CaptureDataResponseData dataResponse = CaptureDataResponseData.parseFrom(response.getData());
        
        //ensure that observation UUID is set
        assertThat(dataResponse.getObservationCase(), is(ObservationCase.OBSERVATIONUUID));
        assertThat(dataResponse.hasObservationUuid(), is(true));
    }
/**
     * Verifies ability of the system to have an asset remotely capture data. 
     */
Verifies ability of the system to have an asset remotely capture data.
Verifies ability of the system to have an asset remotely capture data .
@Test
    public final void testCaptureData_UuidOnlyResponse() throws IOException, AssetException, ObjectConverterException, 
        InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        CaptureDataRequestData request = CaptureDataRequestData.newBuilder()
                .setUuid(testUuid)
                .setObservationFormat(RemoteTypesGen.LexiconFormat.Enum.UUID_ONLY)
                .build();        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.CaptureDataRequest, request);         
        message.writeDelimitedTo(socket.getOutputStream());
        Message responseRcvd = listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.CaptureDataResponse, 1200);  
        AssetNamespace response = (AssetNamespace)responseRcvd;
        CaptureDataResponseData dataResponse = CaptureDataResponseData.parseFrom(response.getData());
        assertThat(dataResponse.getObservationCase(), is(ObservationCase.OBSERVATIONUUID));
        assertThat(dataResponse.hasObservationUuid(), is(true));
    }
@ Test public final void testCaptureData_UuidOnlyResponse ( ) throws IOException , AssetException , ObjectConverterException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; CaptureDataRequestData request = CaptureDataRequestData . newBuilder ( ) . setUuid ( testUuid ) . setObservationFormat ( RemoteTypesGen . LexiconFormat . Enum . UUID_ONLY ) . build ( ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetMessage ( AssetMessageType . CaptureDataRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message responseRcvd = listener . waitForMessage ( Namespace . Asset , AssetMessageType . CaptureDataResponse , 1200 ) ; AssetNamespace response = ( AssetNamespace ) responseRcvd ; CaptureDataResponseData dataResponse = CaptureDataResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getObservationCase ( ) , is ( ObservationCase . OBSERVATIONUUID ) ) ; assertThat ( dataResponse . hasObservationUuid ( ) , is ( true ) ) ; }
Verifies ability of the system to have an asset remotely capture data.
Verifies ability of the system to have an asset remotely capture data .
// build request //listen for messages for a specific time interval //ensure that observation UUID is set