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