mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestTransportLayerNamespace.java
@Test
    public void testIsReceiving() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        
        IsReceivingRequestData isReceivingRequest = IsReceivingRequestData.newBuilder().
                setUuid(transportUuid).
                build();
        
        TransportLayerNamespace.Builder transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.IsReceivingRequest).
                setData(isReceivingRequest.toByteString());
        
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.TransportLayer, 
                transportLayerMessage);
        
        // send out message
        message.writeDelimitedTo(socket.getOutputStream());
        
        // listen for messages for a specific time interval
        Message responseRcvd = listener.waitForMessage(Namespace.TransportLayer,
                TransportLayerMessageType.IsReceivingResponse, listenerTimeout);

        TransportLayerNamespace response = (TransportLayerNamespace)responseRcvd;
        
        IsReceivingResponseData dataResponse = IsReceivingResponseData.parseFrom(
                response.getData());
        
        assertThat(dataResponse.getIsReceiving(), is(false));
    }
/**
     * Assuming a transport layer was created in setup, verify that the default of a newly created transport layer
     * receiving property is set to false.
     */
Assuming a transport layer was created in setup, verify that the default of a newly created transport layer
receiving property is set to false.
Assuming a transport layer was created in setup verify that the default of a newly created transport layer receiving property is set to false .
@Test
    public void testIsReceiving() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        IsReceivingRequestData isReceivingRequest = IsReceivingRequestData.newBuilder().
                setUuid(transportUuid).
                build();
        TransportLayerNamespace.Builder transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.IsReceivingRequest).
                setData(isReceivingRequest.toByteString());
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.TransportLayer, 
                transportLayerMessage);
        message.writeDelimitedTo(socket.getOutputStream());
        Message responseRcvd = listener.waitForMessage(Namespace.TransportLayer,
                TransportLayerMessageType.IsReceivingResponse, listenerTimeout);
        TransportLayerNamespace response = (TransportLayerNamespace)responseRcvd;
        IsReceivingResponseData dataResponse = IsReceivingResponseData.parseFrom(
                response.getData());
        assertThat(dataResponse.getIsReceiving(), is(false));
    }
@ Test public void testIsReceiving ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; IsReceivingRequestData isReceivingRequest = IsReceivingRequestData . newBuilder ( ) . setUuid ( transportUuid ) . build ( ) ; TransportLayerNamespace . Builder transportLayerMessage = TransportLayerNamespace . newBuilder ( ) . setType ( TransportLayerMessageType . IsReceivingRequest ) . setData ( isReceivingRequest . toByteString ( ) ) ; TerraHarvestMessage message = TerraHarvestMessageHelper . createTerraHarvestMsg ( Namespace . TransportLayer , transportLayerMessage ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message responseRcvd = listener . waitForMessage ( Namespace . TransportLayer , TransportLayerMessageType . IsReceivingResponse , listenerTimeout ) ; TransportLayerNamespace response = ( TransportLayerNamespace ) responseRcvd ; IsReceivingResponseData dataResponse = IsReceivingResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getIsReceiving ( ) , is ( false ) ) ; }
Assuming a transport layer was created in setup, verify that the default of a newly created transport layer
 receiving property is set to false.
Assuming a transport layer was created in setup verify that the default of a newly created transport layer receiving property is set to false .
// send out message // listen for messages for a specific time interval