mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/physical/TestPhysicalLinkImpl.java
@Test
    public void testDelete_IsOpen() throws Exception
    {
        when(m_PhysLinkProxy.isOpen()).thenReturn(true);
        
        try
        {
            m_SUT.delete();
            fail("Should fail to delete as link is open");
        }
        catch (IllegalStateException e)
        {
            
        }
        verify(m_FactReg, never()).delete(Mockito.any(FactoryObjectInternal.class));
        verify(m_WakeLock, never()).delete();
    }
/**
     * Verify the registry is not called if link is open.
     */
Verify the registry is not called if link is open.
Verify the registry is not called if link is open .
@Test
    public void testDelete_IsOpen() throws Exception
    {
        when(m_PhysLinkProxy.isOpen()).thenReturn(true);
        try
        {
            m_SUT.delete();
            fail("Should fail to delete as link is open");
        }
        catch (IllegalStateException e)
        {
        }
        verify(m_FactReg, never()).delete(Mockito.any(FactoryObjectInternal.class));
        verify(m_WakeLock, never()).delete();
    }
@ Test public void testDelete_IsOpen ( ) throws Exception { when ( m_PhysLinkProxy . isOpen ( ) ) . thenReturn ( true ) ; try { m_SUT . delete ( ) ; fail ( "Should fail to delete as link is open" ) ; } catch ( IllegalStateException e ) { } verify ( m_FactReg , never ( ) ) . delete ( Mockito . any ( FactoryObjectInternal . class ) ) ; verify ( m_WakeLock , never ( ) ) . delete ( ) ; }
Verify the registry is not called if link is open.
Verify the registry is not called if link is open .