mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/TestQueuedMessageSender.java
@Test
    public void testDeactivate() throws InterruptedException
    {
        // allow thead to start running before stopping it
        Thread.sleep(500);
        
        m_SUT.deactivate();
        
        TerraHarvestMessage message = constructMessage(1);
        m_SUT.queue(message);
        
        // wait to see if thread calls trySendMessage
        Thread.sleep(2000);
        
        // should never have sent message since queued after deactivation
        verify(m_Channel, never()).trySendMessage(message);
    }
/**
     * Verify message will not be attempted to be sent after deactivation.
     */
Verify message will not be attempted to be sent after deactivation.
Verify message will not be attempted to be sent after deactivation .
@Test
    public void testDeactivate() throws InterruptedException
    {
        Thread.sleep(500);
        m_SUT.deactivate();
        TerraHarvestMessage message = constructMessage(1);
        m_SUT.queue(message);
        Thread.sleep(2000);
        verify(m_Channel, never()).trySendMessage(message);
    }
@ Test public void testDeactivate ( ) throws InterruptedException { Thread . sleep ( 500 ) ; m_SUT . deactivate ( ) ; TerraHarvestMessage message = constructMessage ( 1 ) ; m_SUT . queue ( message ) ; Thread . sleep ( 2000 ) ; verify ( m_Channel , never ( ) ) . trySendMessage ( message ) ; }
Verify message will not be attempted to be sent after deactivation.
Verify message will not be attempted to be sent after deactivation .
// allow thead to start running before stopping it // wait to see if thread calls trySendMessage // should never have sent message since queued after deactivation