mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestCustomCommsServiceImpl_Transport.java
@Test
    public void testCreateTransportLayer() throws CCommException, IOException, InterruptedException, 
        FactoryException, IllegalArgumentException, FactoryObjectInformationException, ClassNotFoundException
    {
        String name = "name";
        when(m_TransInternal.getLinkLayer()).thenReturn(m_LinkInternal);
        when(m_LinkInternal.getName()).thenReturn(name);
        
        //checks if get transport back
        String transName = "trans";
        TransportLayer transport = m_SUT.createTransportLayer(TL_PRODUCT_TYPE, transName, name);
        
        //assert
        assertThat(transport, is(notNullValue()));

        //verify
        Map<String, Object> props = new HashMap<>();
        props.put(TransportLayerAttributes.CONFIG_PROP_LINK_LAYER_NAME, name);
        verify(m_TransRegistry).createNewObject(m_TransFactory, transName, props);
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
/**
     * Verifies creation of transport layer works as expected. In particular, verifies created transport layer 
     * associations with link layers and physical links.
     */
Verifies creation of transport layer works as expected. In particular, verifies created transport layer
associations with link layers and physical links.
Verifies creation of transport layer works as expected . In particular verifies created transport layer associations with link layers and physical links .
@Test
    public void testCreateTransportLayer() throws CCommException, IOException, InterruptedException, 
        FactoryException, IllegalArgumentException, FactoryObjectInformationException, ClassNotFoundException
    {
        String name = "name";
        when(m_TransInternal.getLinkLayer()).thenReturn(m_LinkInternal);
        when(m_LinkInternal.getName()).thenReturn(name);
        String transName = "trans";
        TransportLayer transport = m_SUT.createTransportLayer(TL_PRODUCT_TYPE, transName, name);
        assertThat(transport, is(notNullValue()));
        Map<String, Object> props = new HashMap<>();
        props.put(TransportLayerAttributes.CONFIG_PROP_LINK_LAYER_NAME, name);
        verify(m_TransRegistry).createNewObject(m_TransFactory, transName, props);
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
@ Test public void testCreateTransportLayer ( ) throws CCommException , IOException , InterruptedException , FactoryException , IllegalArgumentException , FactoryObjectInformationException , ClassNotFoundException { String name = "name" ; when ( m_TransInternal . getLinkLayer ( ) ) . thenReturn ( m_LinkInternal ) ; when ( m_LinkInternal . getName ( ) ) . thenReturn ( name ) ; String transName = "trans" ; TransportLayer transport = m_SUT . createTransportLayer ( TL_PRODUCT_TYPE , transName , name ) ; assertThat ( transport , is ( notNullValue ( ) ) ) ; Map < String , Object > props = new HashMap < > ( ) ; props . put ( TransportLayerAttributes . CONFIG_PROP_LINK_LAYER_NAME , name ) ; verify ( m_TransRegistry ) . createNewObject ( m_TransFactory , transName , props ) ; verify ( m_WakeLock ) . activate ( ) ; verify ( m_WakeLock ) . cancel ( ) ; }
Verifies creation of transport layer works as expected.
Verifies creation of transport layer works as expected .
//checks if get transport back //assert //verify