mil.dod.th.remote.client/test/mil/dod/th/remote/client/impl/TestMessageListenerServiceImpl.java
@Test
    public void testAddRemoveRemoteChannelNullCallback() throws InterruptedException
    {
        m_SUT.addRemoteChannel(SRC_ID, m_InputStream, null);

        m_SUT.removeRemoteChannel(SRC_ID);

        Thread.sleep(100);

        // Should not be able to remove channel twice
        try
        {
            m_SUT.removeRemoteChannel(SRC_ID);
            fail("removeRemoteChannel should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
            // Expected
        }
    }
/**
     * Verify that a remote channel can be added and removed with a null callback.
     */
Verify that a remote channel can be added and removed with a null callback.
Verify that a remote channel can be added and removed with a null callback .
@Test
    public void testAddRemoveRemoteChannelNullCallback() throws InterruptedException
    {
        m_SUT.addRemoteChannel(SRC_ID, m_InputStream, null);
        m_SUT.removeRemoteChannel(SRC_ID);
        Thread.sleep(100);
        try
        {
            m_SUT.removeRemoteChannel(SRC_ID);
            fail("removeRemoteChannel should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
        }
    }
@ Test public void testAddRemoveRemoteChannelNullCallback ( ) throws InterruptedException { m_SUT . addRemoteChannel ( SRC_ID , m_InputStream , null ) ; m_SUT . removeRemoteChannel ( SRC_ID ) ; Thread . sleep ( 100 ) ; try { m_SUT . removeRemoteChannel ( SRC_ID ) ; fail ( "removeRemoteChannel should throw IllegalArgumentException" ) ; } catch ( IllegalArgumentException e ) { } }
Verify that a remote channel can be added and removed with a null callback.
Verify that a remote channel can be added and removed with a null callback .
// Should not be able to remove channel twice // Expected