mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestCustomCommsServiceImpl_LinkLayer.java
@Test
    public void testCreateLinkLayer_InvalidPhysicalLinkName() throws CCommException
    {
        Map<String, Object> props = new HashMap<>();
        props.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, null);
        
        try
        {
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "linkLayer", props);
            fail("Expecting exception as property value is null");
        }
        catch (IllegalArgumentException e) { }
        
        // try with empty string
        props.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, "");
        try
        {
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "linkLayer", props);
            fail("Expecting exception as property value is empty");
        }
        catch (IllegalArgumentException e) { }

        verify(m_WakeLock, never()).activate();
        verify(m_WakeLock, never()).cancel();
    }
/**
     * Verify if the physical link property is specified but an empty string or null, an exception is thrown.
     */
Verify if the physical link property is specified but an empty string or null, an exception is thrown.
Verify if the physical link property is specified but an empty string or null an exception is thrown .
@Test
    public void testCreateLinkLayer_InvalidPhysicalLinkName() throws CCommException
    {
        Map<String, Object> props = new HashMap<>();
        props.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, null);
        try
        {
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "linkLayer", props);
            fail("Expecting exception as property value is null");
        }
        catch (IllegalArgumentException e) { }
        props.put(LinkLayerAttributes.CONFIG_PROP_PHYSICAL_LINK_NAME, "");
        try
        {
            m_SUT.createLinkLayer(LL_PRODUCT_TYPE, "linkLayer", props);
            fail("Expecting exception as property value is empty");
        }
        catch (IllegalArgumentException e) { }
        verify(m_WakeLock, never()).activate();
        verify(m_WakeLock, never()).cancel();
    }
@ Test public void testCreateLinkLayer_InvalidPhysicalLinkName ( ) throws CCommException { Map < String , Object > props = new HashMap < > ( ) ; props . put ( LinkLayerAttributes . CONFIG_PROP_PHYSICAL_LINK_NAME , null ) ; try { m_SUT . createLinkLayer ( LL_PRODUCT_TYPE , "linkLayer" , props ) ; fail ( "Expecting exception as property value is null" ) ; } catch ( IllegalArgumentException e ) { } props . put ( LinkLayerAttributes . CONFIG_PROP_PHYSICAL_LINK_NAME , "" ) ; try { m_SUT . createLinkLayer ( LL_PRODUCT_TYPE , "linkLayer" , props ) ; fail ( "Expecting exception as property value is empty" ) ; } catch ( IllegalArgumentException e ) { } verify ( m_WakeLock , never ( ) ) . activate ( ) ; verify ( m_WakeLock , never ( ) ) . cancel ( ) ; }
Verify if the physical link property is specified but an empty string or null, an exception is thrown.
Verify if the physical link property is specified but an empty string or null an exception is thrown .
// try with empty string