mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestCustomCommsServiceImpl_Transport.java
@Test
    public void testCreateTransportLayerNoFactory() throws IOException, InterruptedException, FactoryException
    {
        when(m_TransportLayerServiceContext.getFactories()).thenReturn(Collections.emptyMap());

        try
        {
            m_SUT.createTransportLayer(TL_PRODUCT_TYPE, null, "jazz");
            fail("Expecting exception");
        }
        catch (CCommException e)
        {
            verify(m_WakeLock, never()).activate();
            verify(m_WakeLock, never()).cancel();
        }
    }
/**
     * Verify that if a transport layer factory is not available, an instance can't be created.
     */
Verify that if a transport layer factory is not available, an instance can't be created.
Verify that if a transport layer factory is not available an instance can ' t be created .
@Test
    public void testCreateTransportLayerNoFactory() throws IOException, InterruptedException, FactoryException
    {
        when(m_TransportLayerServiceContext.getFactories()).thenReturn(Collections.emptyMap());
        try
        {
            m_SUT.createTransportLayer(TL_PRODUCT_TYPE, null, "jazz");
            fail("Expecting exception");
        }
        catch (CCommException e)
        {
            verify(m_WakeLock, never()).activate();
            verify(m_WakeLock, never()).cancel();
        }
    }
@ Test public void testCreateTransportLayerNoFactory ( ) throws IOException , InterruptedException , FactoryException { when ( m_TransportLayerServiceContext . getFactories ( ) ) . thenReturn ( Collections . emptyMap ( ) ) ; try { m_SUT . createTransportLayer ( TL_PRODUCT_TYPE , null , "jazz" ) ; fail ( "Expecting exception" ) ; } catch ( CCommException e ) { verify ( m_WakeLock , never ( ) ) . activate ( ) ; verify ( m_WakeLock , never ( ) ) . cancel ( ) ; } }
Verify that if a transport layer factory is not available, an instance can't be created.
Verify that if a transport layer factory is not available an instance can ' t be created .