mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestRemoteChannelLookupNamespace.java
@Test
    public void testSyncTransportLayer() throws IOException, InterruptedException
    {
        //request the syncing of the channel
        MessageListener listener = new MessageListener(socket);
        
        SyncTransportChannelRequestData request = SyncTransportChannelRequestData.newBuilder().
                setDestSystemAddress("remote").
                setRemoteSystemAddress("local").
                setTransportLayerName("trans-12").
                setRemoteSystemId(7).build();
        
        TerraHarvestMessage thMessage = 
            createRemoteChannelLookupMessage(RemoteChannelLookupMessageType.SyncTransportChannelRequest, request);
        
        thMessage.writeDelimitedTo(socket.getOutputStream());

        //get namespace message
        RemoteChannelLookupNamespace namespaceMessage = (RemoteChannelLookupNamespace)listener.waitForMessage(
            Namespace.RemoteChannelLookup, RemoteChannelLookupMessageType.SyncTransportChannelResponse, 500);
        //create response message
        SyncTransportChannelResponseData responseMessage = 
            SyncTransportChannelResponseData.parseFrom(namespaceMessage.getData());
        
        assertThat(responseMessage.getRemoteSystemId(), is(7));
        assertThat(responseMessage.getTransportLayerName(), is("trans-12"));
        assertThat(responseMessage.getRemoteSystemAddress(), is("local"));
        assertThat(responseMessage.getSourceSystemAddress(), is("remote"));
    }
/**
     * Verify ability to remotely sync a transport layer.
     */
Verify ability to remotely sync a transport layer.
Verify ability to remotely sync a transport layer .
@Test
    public void testSyncTransportLayer() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        SyncTransportChannelRequestData request = SyncTransportChannelRequestData.newBuilder().
                setDestSystemAddress("remote").
                setRemoteSystemAddress("local").
                setTransportLayerName("trans-12").
                setRemoteSystemId(7).build();
        TerraHarvestMessage thMessage = 
            createRemoteChannelLookupMessage(RemoteChannelLookupMessageType.SyncTransportChannelRequest, request);
        thMessage.writeDelimitedTo(socket.getOutputStream());
        RemoteChannelLookupNamespace namespaceMessage = (RemoteChannelLookupNamespace)listener.waitForMessage(
            Namespace.RemoteChannelLookup, RemoteChannelLookupMessageType.SyncTransportChannelResponse, 500);
        SyncTransportChannelResponseData responseMessage = 
            SyncTransportChannelResponseData.parseFrom(namespaceMessage.getData());
        assertThat(responseMessage.getRemoteSystemId(), is(7));
        assertThat(responseMessage.getTransportLayerName(), is("trans-12"));
        assertThat(responseMessage.getRemoteSystemAddress(), is("local"));
        assertThat(responseMessage.getSourceSystemAddress(), is("remote"));
    }
@ Test public void testSyncTransportLayer ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; SyncTransportChannelRequestData request = SyncTransportChannelRequestData . newBuilder ( ) . setDestSystemAddress ( "remote" ) . setRemoteSystemAddress ( "local" ) . setTransportLayerName ( "trans-12" ) . setRemoteSystemId ( 7 ) . build ( ) ; TerraHarvestMessage thMessage = createRemoteChannelLookupMessage ( RemoteChannelLookupMessageType . SyncTransportChannelRequest , request ) ; thMessage . writeDelimitedTo ( socket . getOutputStream ( ) ) ; RemoteChannelLookupNamespace namespaceMessage = ( RemoteChannelLookupNamespace ) listener . waitForMessage ( Namespace . RemoteChannelLookup , RemoteChannelLookupMessageType . SyncTransportChannelResponse , 500 ) ; SyncTransportChannelResponseData responseMessage = SyncTransportChannelResponseData . parseFrom ( namespaceMessage . getData ( ) ) ; assertThat ( responseMessage . getRemoteSystemId ( ) , is ( 7 ) ) ; assertThat ( responseMessage . getTransportLayerName ( ) , is ( "trans-12" ) ) ; assertThat ( responseMessage . getRemoteSystemAddress ( ) , is ( "local" ) ) ; assertThat ( responseMessage . getSourceSystemAddress ( ) , is ( "remote" ) ) ; }
Verify ability to remotely sync a transport layer.
Verify ability to remotely sync a transport layer .
//request the syncing of the channel //get namespace message //create response message