mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testPerformBIT() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        //build request
        PerformBitRequestData request = PerformBitRequestData.newBuilder().
                setUuid(testUuid).build();        

        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.PerformBitRequest, request);
        message.writeDelimitedTo(socket.getOutputStream());

        //listen for messages for a specific time interval
        AssetNamespace response = (AssetNamespace)listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.PerformBitResponse, 500); 
        PerformBitResponseData dataResponse = PerformBitResponseData.parseFrom(response.getData());

        assertThat(dataResponse.getAssetUuid(), is(testUuid));
        ObservationGen.Observation obs = dataResponse.getStatusObservationNative();
        assertThat(obs.getStatus().getSummaryStatus().getSummary(), 
                is(StatusTypesGen.SummaryStatus.Enum.GOOD));
        assertThat(obs.getStatus().getSummaryStatus().getDescription(), is("BIT Passed"));
    }
/**
     * Verifies ability of system to remotely have an asset perform a built-in-test. 
     */
Verifies ability of system to remotely have an asset perform a built-in-test.
Verifies ability of system to remotely have an asset perform a built - in - test .
@Test
    public final void testPerformBIT() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        PerformBitRequestData request = PerformBitRequestData.newBuilder().
                setUuid(testUuid).build();        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.PerformBitRequest, request);
        message.writeDelimitedTo(socket.getOutputStream());
        AssetNamespace response = (AssetNamespace)listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.PerformBitResponse, 500); 
        PerformBitResponseData dataResponse = PerformBitResponseData.parseFrom(response.getData());
        assertThat(dataResponse.getAssetUuid(), is(testUuid));
        ObservationGen.Observation obs = dataResponse.getStatusObservationNative();
        assertThat(obs.getStatus().getSummaryStatus().getSummary(), 
                is(StatusTypesGen.SummaryStatus.Enum.GOOD));
        assertThat(obs.getStatus().getSummaryStatus().getDescription(), is("BIT Passed"));
    }
@ Test public final void testPerformBIT ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; PerformBitRequestData request = PerformBitRequestData . newBuilder ( ) . setUuid ( testUuid ) . build ( ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetMessage ( AssetMessageType . PerformBitRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; AssetNamespace response = ( AssetNamespace ) listener . waitForMessage ( Namespace . Asset , AssetMessageType . PerformBitResponse , 500 ) ; PerformBitResponseData dataResponse = PerformBitResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getAssetUuid ( ) , is ( testUuid ) ) ; ObservationGen . Observation obs = dataResponse . getStatusObservationNative ( ) ; assertThat ( obs . getStatus ( ) . getSummaryStatus ( ) . getSummary ( ) , is ( StatusTypesGen . SummaryStatus . Enum . GOOD ) ) ; assertThat ( obs . getStatus ( ) . getSummaryStatus ( ) . getDescription ( ) , is ( "BIT Passed" ) ) ; }
Verifies ability of system to remotely have an asset perform a built-in-test.
Verifies ability of system to remotely have an asset perform a built - in - test .
//build request //listen for messages for a specific time interval