mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/ccomms/TestCustomCommUtility.java
@Test
    public void testGetTransportLayerByUuid()
    {
        m_CustomCommsService = mock(CustomCommsService.class);
        
        java.util.UUID javaUuid = java.util.UUID.randomUUID();
        UUID uuid = SharedMessageUtils.convertUUIDToProtoUUID(javaUuid);
        
        TransportLayer testTransport = mock(TransportLayer.class);
        when(testTransport.getUuid()).thenReturn(javaUuid);
        
        List<TransportLayer> transportList = new ArrayList<TransportLayer>();
        transportList.add(testTransport);
        
        when(m_CustomCommsService.getTransportLayers()).thenReturn(transportList);
        
        assertThat(CustomCommUtility.getTransportLayerByUuid(m_CustomCommsService, uuid), is(testTransport));
    }
/**
     * Verify using the utility the user can retrieve a transport layer by the proto uuid that is in the custom
     * comms service.
     */
Verify using the utility the user can retrieve a transport layer by the proto uuid that is in the custom
comms service.
Verify using the utility the user can retrieve a transport layer by the proto uuid that is in the custom comms service .
@Test
    public void testGetTransportLayerByUuid()
    {
        m_CustomCommsService = mock(CustomCommsService.class);
        java.util.UUID javaUuid = java.util.UUID.randomUUID();
        UUID uuid = SharedMessageUtils.convertUUIDToProtoUUID(javaUuid);
        TransportLayer testTransport = mock(TransportLayer.class);
        when(testTransport.getUuid()).thenReturn(javaUuid);
        List<TransportLayer> transportList = new ArrayList<TransportLayer>();
        transportList.add(testTransport);
        when(m_CustomCommsService.getTransportLayers()).thenReturn(transportList);
        assertThat(CustomCommUtility.getTransportLayerByUuid(m_CustomCommsService, uuid), is(testTransport));
    }
@ Test public void testGetTransportLayerByUuid ( ) { m_CustomCommsService = mock ( CustomCommsService . class ) ; java . util . UUID javaUuid = java . util . UUID . randomUUID ( ) ; UUID uuid = SharedMessageUtils . convertUUIDToProtoUUID ( javaUuid ) ; TransportLayer testTransport = mock ( TransportLayer . class ) ; when ( testTransport . getUuid ( ) ) . thenReturn ( javaUuid ) ; List < TransportLayer > transportList = new ArrayList < TransportLayer > ( ) ; transportList . add ( testTransport ) ; when ( m_CustomCommsService . getTransportLayers ( ) ) . thenReturn ( transportList ) ; assertThat ( CustomCommUtility . getTransportLayerByUuid ( m_CustomCommsService , uuid ) , is ( testTransport ) ) ; }
Verify using the utility the user can retrieve a transport layer by the proto uuid that is in the custom
 comms service.
Verify using the utility the user can retrieve a transport layer by the proto uuid that is in the custom comms service .