mil.dod.th.ose.utils/test/mil/dod/th/ose/utils/TestSingleComponent.java
@Test
    public void testTryDispose_AfterDispose()
    {
        Dictionary<String, Object> props = new Hashtable<>();
        props.put("key", "value");
        
        m_SUT.newInstance(props);
        
        m_SUT.tryDispose();
        
        m_SUT.tryDispose();
        
        verify(instance).dispose();
    }
/**
     * Verify can try to dispose twice without error and underlying instance is only disposed of once.
     */
Verify can try to dispose twice without error and underlying instance is only disposed of once.
Verify can try to dispose twice without error and underlying instance is only disposed of once .
@Test
    public void testTryDispose_AfterDispose()
    {
        Dictionary<String, Object> props = new Hashtable<>();
        props.put("key", "value");
        m_SUT.newInstance(props);
        m_SUT.tryDispose();
        m_SUT.tryDispose();
        verify(instance).dispose();
    }
@ Test public void testTryDispose_AfterDispose ( ) { Dictionary < String , Object > props = new Hashtable < > ( ) ; props . put ( "key" , "value" ) ; m_SUT . newInstance ( props ) ; m_SUT . tryDispose ( ) ; m_SUT . tryDispose ( ) ; verify ( instance ) . dispose ( ) ; }
Verify can try to dispose twice without error and underlying instance is only disposed of once.
Verify can try to dispose twice without error and underlying instance is only disposed of once .