mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/TestPhysicalLinkRegistryCallback.java
@Test
    public void testOnRemovedObjectOpenException() throws PhysicalLinkException
    {
        PhysicalLinkInternal phys =  mock(PhysicalLinkInternal.class);
        when(phys.isOpen()).thenReturn(true);
        doThrow(new PhysicalLinkException("uh oh")).when(phys).close();
        
        m_SUT.onRemovedObject(phys);
    }
/**
     * Verify when an phys is removed that the link is attempted to be closed.
     * Verify if unable to close that no exception is thrown from the method call.
     */
Verify when an phys is removed that the link is attempted to be closed.
Verify if unable to close that no exception is thrown from the method call.
Verify when an phys is removed that the link is attempted to be closed . Verify if unable to close that no exception is thrown from the method call .
@Test
    public void testOnRemovedObjectOpenException() throws PhysicalLinkException
    {
        PhysicalLinkInternal phys =  mock(PhysicalLinkInternal.class);
        when(phys.isOpen()).thenReturn(true);
        doThrow(new PhysicalLinkException("uh oh")).when(phys).close();
        m_SUT.onRemovedObject(phys);
    }
@ Test public void testOnRemovedObjectOpenException ( ) throws PhysicalLinkException { PhysicalLinkInternal phys = mock ( PhysicalLinkInternal . class ) ; when ( phys . isOpen ( ) ) . thenReturn ( true ) ; doThrow ( new PhysicalLinkException ( "uh oh" ) ) . when ( phys ) . close ( ) ; m_SUT . onRemovedObject ( phys ) ; }
Verify when an phys is removed that the link is attempted to be closed.
Verify when an phys is removed that the link is attempted to be closed .