mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestLinkLayerNamespace.java
@Test
    public void testGetMTU() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        
        // construct new link layer message type
        GetMtuRequestData getMtuRequest = GetMtuRequestData.newBuilder().
                setUuid(linkUuid).
                build();
        
        LinkLayerNamespace.Builder linkLayerMessage = LinkLayerNamespace.newBuilder().
                setType(LinkLayerMessageType.GetMtuRequest).
                setData(getMtuRequest.toByteString());
        
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.LinkLayer, 
                linkLayerMessage);
        
        message.writeDelimitedTo(socket.getOutputStream());
        
        // listen for messages for a specific time interval
        LinkLayerNamespace response = (LinkLayerNamespace)listener.waitForMessage(Namespace.LinkLayer,
                LinkLayerMessageType.GetMtuResponse, listenerTimeout);
        
        GetMtuResponseData dataResponse = GetMtuResponseData.parseFrom(response.getData());
        
        // verify dynamic value returned by proxy is returned through remote interface
        assertThat(dataResponse.getMtu(), is(1000));
    }
/**
     * Assuming that a link layer was created in setup, verify the correct MTU can be received.
     */
Assuming that a link layer was created in setup, verify the correct MTU can be received.
Assuming that a link layer was created in setup verify the correct MTU can be received .
@Test
    public void testGetMTU() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        GetMtuRequestData getMtuRequest = GetMtuRequestData.newBuilder().
                setUuid(linkUuid).
                build();
        LinkLayerNamespace.Builder linkLayerMessage = LinkLayerNamespace.newBuilder().
                setType(LinkLayerMessageType.GetMtuRequest).
                setData(getMtuRequest.toByteString());
        TerraHarvestMessage message = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.LinkLayer, 
                linkLayerMessage);
        message.writeDelimitedTo(socket.getOutputStream());
        LinkLayerNamespace response = (LinkLayerNamespace)listener.waitForMessage(Namespace.LinkLayer,
                LinkLayerMessageType.GetMtuResponse, listenerTimeout);
        GetMtuResponseData dataResponse = GetMtuResponseData.parseFrom(response.getData());
        assertThat(dataResponse.getMtu(), is(1000));
    }
@ Test public void testGetMTU ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; GetMtuRequestData getMtuRequest = GetMtuRequestData . newBuilder ( ) . setUuid ( linkUuid ) . build ( ) ; LinkLayerNamespace . Builder linkLayerMessage = LinkLayerNamespace . newBuilder ( ) . setType ( LinkLayerMessageType . GetMtuRequest ) . setData ( getMtuRequest . toByteString ( ) ) ; TerraHarvestMessage message = TerraHarvestMessageHelper . createTerraHarvestMsg ( Namespace . LinkLayer , linkLayerMessage ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; LinkLayerNamespace response = ( LinkLayerNamespace ) listener . waitForMessage ( Namespace . LinkLayer , LinkLayerMessageType . GetMtuResponse , listenerTimeout ) ; GetMtuResponseData dataResponse = GetMtuResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getMtu ( ) , is ( 1000 ) ) ; }
Assuming that a link layer was created in setup, verify the correct MTU can be received.
Assuming that a link layer was created in setup verify the correct MTU can be received .
// construct new link layer message type // listen for messages for a specific time interval // verify dynamic value returned by proxy is returned through remote interface