mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestCustomCommsServiceImpl_LinkLayer.java
@Test
    public void testFindLinkLayer() 
        throws InterruptedException, CCommException, IllegalArgumentException, IllegalStateException, 
            FactoryException, IOException, FactoryObjectInformationException 
    {
        //initial behavior without layer
        assertThat(m_SUT.findLinkLayer("noodle"), is(nullValue()));
        
        String name = "name";
        
        when(m_PhysInternal.getName()).thenReturn(name);
        PhysicalLink physicalLink = m_SUT.createPhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT);

        LinkLayer layer = m_SUT.createLinkLayer(LL_PRODUCT_TYPE, name, physicalLink.getName());
        
        //reg mock
        when(m_LinkRegistry.findObjectByName(name)).thenReturn(m_LinkInternal);
        
        LinkLayer recvd = m_SUT.findLinkLayer(name);
        
        assertThat(recvd, is(layer));
    }
/**
     * Verify that a link layer can be found by its name.
     */
Verify that a link layer can be found by its name.
Verify that a link layer can be found by its name .
@Test
    public void testFindLinkLayer() 
        throws InterruptedException, CCommException, IllegalArgumentException, IllegalStateException, 
            FactoryException, IOException, FactoryObjectInformationException 
    {
        assertThat(m_SUT.findLinkLayer("noodle"), is(nullValue()));
        String name = "name";
        when(m_PhysInternal.getName()).thenReturn(name);
        PhysicalLink physicalLink = m_SUT.createPhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT);
        LinkLayer layer = m_SUT.createLinkLayer(LL_PRODUCT_TYPE, name, physicalLink.getName());
        when(m_LinkRegistry.findObjectByName(name)).thenReturn(m_LinkInternal);
        LinkLayer recvd = m_SUT.findLinkLayer(name);
        assertThat(recvd, is(layer));
    }
@ Test public void testFindLinkLayer ( ) throws InterruptedException , CCommException , IllegalArgumentException , IllegalStateException , FactoryException , IOException , FactoryObjectInformationException { assertThat ( m_SUT . findLinkLayer ( "noodle" ) , is ( nullValue ( ) ) ) ; String name = "name" ; when ( m_PhysInternal . getName ( ) ) . thenReturn ( name ) ; PhysicalLink physicalLink = m_SUT . createPhysicalLink ( PhysicalLinkTypeEnum . SERIAL_PORT ) ; LinkLayer layer = m_SUT . createLinkLayer ( LL_PRODUCT_TYPE , name , physicalLink . getName ( ) ) ; when ( m_LinkRegistry . findObjectByName ( name ) ) . thenReturn ( m_LinkInternal ) ; LinkLayer recvd = m_SUT . findLinkLayer ( name ) ; assertThat ( recvd , is ( layer ) ) ; }
Verify that a link layer can be found by its name.
Verify that a link layer can be found by its name .
//initial behavior without layer //reg mock