mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestCustomCommsServiceImpl_LinkLayer.java
@Test
    public void testNoFactory() throws FactoryException, CCommException
    {
        when(m_LinkLayerServiceContext.getFactories()).thenReturn(Collections.emptyMap());
        
        //verify unable to create link layer
        try
        {
            // mock a factory object
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "blah");
            fail("Expected exception because there should be no factories available.");
        }
        catch (CCommException e)
        {
            //expected exception
        }
    }
/**
     * Verify that a link layer cannot be created if there are no factories available.
     */
Verify that a link layer cannot be created if there are no factories available.
Verify that a link layer cannot be created if there are no factories available .
@Test
    public void testNoFactory() throws FactoryException, CCommException
    {
        when(m_LinkLayerServiceContext.getFactories()).thenReturn(Collections.emptyMap());
        try
        {
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "blah");
            fail("Expected exception because there should be no factories available.");
        }
        catch (CCommException e)
        {
        }
    }
@ Test public void testNoFactory ( ) throws FactoryException , CCommException { when ( m_LinkLayerServiceContext . getFactories ( ) ) . thenReturn ( Collections . emptyMap ( ) ) ; try { m_SUT . createLinkLayer ( LL_PRODUCT_TYPE , "blah" ) ; fail ( "Expected exception because there should be no factories available." ) ; } catch ( CCommException e ) { } }
Verify that a link layer cannot be created if there are no factories available.
Verify that a link layer cannot be created if there are no factories available .
//verify unable to create link layer // mock a factory object //expected exception