mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/physical/TestPhysicalLinkImpl.java
@Test
    public void testRelease() throws Exception 
    {
        //mocking
        LinkLayer linkLayer = mock(LinkLayer.class);
        when(m_PhysLinkProxy.isOpen()).thenReturn(false);
        
        //act
        m_SUT.setInUse(true);
        m_SUT.setOwner(linkLayer);
        m_SUT.release();
        
        assertThat(m_SUT.isInUse(), is(false));
        assertThat(m_SUT.getOwner(), is(nullValue()));
    }
/**
     * Verify a physical link can be released.
     */
Verify a physical link can be released.
Verify a physical link can be released .
@Test
    public void testRelease() throws Exception 
    {
        LinkLayer linkLayer = mock(LinkLayer.class);
        when(m_PhysLinkProxy.isOpen()).thenReturn(false);
        m_SUT.setInUse(true);
        m_SUT.setOwner(linkLayer);
        m_SUT.release();
        assertThat(m_SUT.isInUse(), is(false));
        assertThat(m_SUT.getOwner(), is(nullValue()));
    }
@ Test public void testRelease ( ) throws Exception { LinkLayer linkLayer = mock ( LinkLayer . class ) ; when ( m_PhysLinkProxy . isOpen ( ) ) . thenReturn ( false ) ; m_SUT . setInUse ( true ) ; m_SUT . setOwner ( linkLayer ) ; m_SUT . release ( ) ; assertThat ( m_SUT . isInUse ( ) , is ( false ) ) ; assertThat ( m_SUT . getOwner ( ) , is ( nullValue ( ) ) ) ; }
Verify a physical link can be released.
Verify a physical link can be released .
//mocking //act