mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestTransportLayerNamespace.java
@Test
    public void testGetLinkLayer() throws IOException
    {
        GetLinkLayerRequestData getLinkLayerRequest = GetLinkLayerRequestData.newBuilder().
                setUuid(transportUuid).
                build();
        
        TransportLayerNamespace.Builder transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.GetLinkLayerRequest).
                setData(getLinkLayerRequest.toByteString());
        
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.TransportLayer, 
                transportLayerMessage);
        
        // send out message
        message.writeDelimitedTo(socket.getOutputStream());
        
        // read in response
        TerraHarvestMessage response = TerraHarvestMessage.parseDelimitedFrom(socket.getInputStream());
        TerraHarvestPayload payLoadTest = TerraHarvestPayload.parseFrom(response.getTerraHarvestPayload());
        
        TransportLayerNamespace namespaceResponse = TransportLayerNamespace.
              parseFrom(payLoadTest.getNamespaceMessage());
        
        GetLinkLayerResponseData getLinkLayerResponse = GetLinkLayerResponseData.parseFrom(
                namespaceResponse.getData());
        
        assertThat(getLinkLayerResponse.getUuid(), is(linkUuid));
    }
/**
     * Assuming that a transport layer was created in setup with an associated link layer, verify that the correct 
     * link layer is returned when requesting to get the link layer for the transport layer.
     */
Assuming that a transport layer was created in setup with an associated link layer, verify that the correct
link layer is returned when requesting to get the link layer for the transport layer.
Assuming that a transport layer was created in setup with an associated link layer verify that the correct link layer is returned when requesting to get the link layer for the transport layer .
@Test
    public void testGetLinkLayer() throws IOException
    {
        GetLinkLayerRequestData getLinkLayerRequest = GetLinkLayerRequestData.newBuilder().
                setUuid(transportUuid).
                build();
        TransportLayerNamespace.Builder transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.GetLinkLayerRequest).
                setData(getLinkLayerRequest.toByteString());
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.TransportLayer, 
                transportLayerMessage);
        message.writeDelimitedTo(socket.getOutputStream());
        TerraHarvestMessage response = TerraHarvestMessage.parseDelimitedFrom(socket.getInputStream());
        TerraHarvestPayload payLoadTest = TerraHarvestPayload.parseFrom(response.getTerraHarvestPayload());
        TransportLayerNamespace namespaceResponse = TransportLayerNamespace.
              parseFrom(payLoadTest.getNamespaceMessage());
        GetLinkLayerResponseData getLinkLayerResponse = GetLinkLayerResponseData.parseFrom(
                namespaceResponse.getData());
        assertThat(getLinkLayerResponse.getUuid(), is(linkUuid));
    }
@ Test public void testGetLinkLayer ( ) throws IOException { GetLinkLayerRequestData getLinkLayerRequest = GetLinkLayerRequestData . newBuilder ( ) . setUuid ( transportUuid ) . build ( ) ; TransportLayerNamespace . Builder transportLayerMessage = TransportLayerNamespace . newBuilder ( ) . setType ( TransportLayerMessageType . GetLinkLayerRequest ) . setData ( getLinkLayerRequest . toByteString ( ) ) ; TerraHarvestMessage message = TerraHarvestMessageHelper . createTerraHarvestMsg ( Namespace . TransportLayer , transportLayerMessage ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; TerraHarvestMessage response = TerraHarvestMessage . parseDelimitedFrom ( socket . getInputStream ( ) ) ; TerraHarvestPayload payLoadTest = TerraHarvestPayload . parseFrom ( response . getTerraHarvestPayload ( ) ) ; TransportLayerNamespace namespaceResponse = TransportLayerNamespace . parseFrom ( payLoadTest . getNamespaceMessage ( ) ) ; GetLinkLayerResponseData getLinkLayerResponse = GetLinkLayerResponseData . parseFrom ( namespaceResponse . getData ( ) ) ; assertThat ( getLinkLayerResponse . getUuid ( ) , is ( linkUuid ) ) ; }
Assuming that a transport layer was created in setup with an associated link layer, verify that the correct
 link layer is returned when requesting to get the link layer for the transport layer.
Assuming that a transport layer was created in setup with an associated link layer verify that the correct link layer is returned when requesting to get the link layer for the transport layer .
// send out message // read in response