mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/config/TestRemoteChannelConfigs.java
@Test
    public void testTransportChannelCreateTrySend() throws CCommException
    {
        RemoteChannelLookup remoteChannelLookup = IntegrationTestRunner.getService(RemoteChannelLookup.class);
              
        TransportChannel transportChannel = (TransportChannel)remoteChannelLookup.getChannels(250).get(0);
        TerraHarvestMessage tMessage = createMessage();
        //Try sending a message before the transport layer has been created. Message should fail to send.
        boolean sent = transportChannel.trySendMessage(tMessage);
        assertThat(sent, is(false));
        
        CustomCommsService customCommsService = IntegrationTestRunner.getService(CustomCommsService.class);
        //Create the transport layer needed by the channel.
        TransportLayer tLayer = customCommsService.createTransportLayer("example.ccomms.EchoTransport", 
                transportChannel.getTransportLayerName(), (String)null);
        assertThat(tLayer, is(notNullValue()));
        
        //Try sending a message now that the transport layer exists. Message should send successfully.
        sent = transportChannel.trySendMessage(tMessage);
        assertThat(sent, is(true));
    }
/**
     * Verify that the XML created transport channel can send a message through a transport layer that is created after
     * the channel.
     */
Verify that the XML created transport channel can send a message through a transport layer that is created after
the channel.
Verify that the XML created transport channel can send a message through a transport layer that is created after the channel .
@Test
    public void testTransportChannelCreateTrySend() throws CCommException
    {
        RemoteChannelLookup remoteChannelLookup = IntegrationTestRunner.getService(RemoteChannelLookup.class);
        TransportChannel transportChannel = (TransportChannel)remoteChannelLookup.getChannels(250).get(0);
        TerraHarvestMessage tMessage = createMessage();
        boolean sent = transportChannel.trySendMessage(tMessage);
        assertThat(sent, is(false));
        CustomCommsService customCommsService = IntegrationTestRunner.getService(CustomCommsService.class);
        TransportLayer tLayer = customCommsService.createTransportLayer("example.ccomms.EchoTransport", 
                transportChannel.getTransportLayerName(), (String)null);
        assertThat(tLayer, is(notNullValue()));
        sent = transportChannel.trySendMessage(tMessage);
        assertThat(sent, is(true));
    }
@ Test public void testTransportChannelCreateTrySend ( ) throws CCommException { RemoteChannelLookup remoteChannelLookup = IntegrationTestRunner . getService ( RemoteChannelLookup . class ) ; TransportChannel transportChannel = ( TransportChannel ) remoteChannelLookup . getChannels ( 250 ) . get ( 0 ) ; TerraHarvestMessage tMessage = createMessage ( ) ; boolean sent = transportChannel . trySendMessage ( tMessage ) ; assertThat ( sent , is ( false ) ) ; CustomCommsService customCommsService = IntegrationTestRunner . getService ( CustomCommsService . class ) ; TransportLayer tLayer = customCommsService . createTransportLayer ( "example.ccomms.EchoTransport" , transportChannel . getTransportLayerName ( ) , ( String ) null ) ; assertThat ( tLayer , is ( notNullValue ( ) ) ) ; sent = transportChannel . trySendMessage ( tMessage ) ; assertThat ( sent , is ( true ) ) ; }
Verify that the XML created transport channel can send a message through a transport layer that is created after
 the channel.
Verify that the XML created transport channel can send a message through a transport layer that is created after the channel .
//Try sending a message before the transport layer has been created. Message should fail to send. //Create the transport layer needed by the channel. //Try sending a message now that the transport layer exists. Message should send successfully.