mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestLinkLayerRegistryCallback.java
@Test
    public void testPreObjectEmptyPhysProp() throws Exception
    {
        LinkLayerInternal linkInternal = mock(LinkLayerInternal.class);
        LinkLayerAttributes attrs = mock(LinkLayerAttributes.class);
        when(linkInternal.getConfig()).thenReturn(attrs);
        when(attrs.physicalLinkName()).thenReturn(null);
        
        m_SUT.preObjectInitialize(linkInternal);
        
        m_SUT.preObjectUpdated(linkInternal);
        
        // try with 
        when(attrs.physicalLinkName()).thenReturn("");

        m_SUT.preObjectInitialize(linkInternal);
        
        m_SUT.preObjectUpdated(linkInternal);
    }
/**
     * Verify physical link can be null or an empty string
     */
Verify physical link can be null or an empty string
Verify physical link can be null or an empty string
@Test
    public void testPreObjectEmptyPhysProp() throws Exception
    {
        LinkLayerInternal linkInternal = mock(LinkLayerInternal.class);
        LinkLayerAttributes attrs = mock(LinkLayerAttributes.class);
        when(linkInternal.getConfig()).thenReturn(attrs);
        when(attrs.physicalLinkName()).thenReturn(null);
        m_SUT.preObjectInitialize(linkInternal);
        m_SUT.preObjectUpdated(linkInternal);
        when(attrs.physicalLinkName()).thenReturn("");
        m_SUT.preObjectInitialize(linkInternal);
        m_SUT.preObjectUpdated(linkInternal);
    }
@ Test public void testPreObjectEmptyPhysProp ( ) throws Exception { LinkLayerInternal linkInternal = mock ( LinkLayerInternal . class ) ; LinkLayerAttributes attrs = mock ( LinkLayerAttributes . class ) ; when ( linkInternal . getConfig ( ) ) . thenReturn ( attrs ) ; when ( attrs . physicalLinkName ( ) ) . thenReturn ( null ) ; m_SUT . preObjectInitialize ( linkInternal ) ; m_SUT . preObjectUpdated ( linkInternal ) ; when ( attrs . physicalLinkName ( ) ) . thenReturn ( "" ) ; m_SUT . preObjectInitialize ( linkInternal ) ; m_SUT . preObjectUpdated ( linkInternal ) ; }
Verify physical link can be null or an empty string
Verify physical link can be null or an empty string
// try with 