mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageSenderImpl.java
@Test
    public void testQueueBaseMessageRemoteEncryptionServiceException() throws IOException
    {
        // construct data message to send
        ControllerInfoData systemInfoData = ControllerInfoData.newBuilder().setName("blah").build();
        
        TerraHarvestMessage request = 
                createMessageWithDestSource(m_LocalId, m_RemoteId, 0 , Namespace.Base, systemInfoData);
        
        TerraHarvestPayload payload = TerraHarvestPayload.parseFrom(request.getTerraHarvestPayload());
        
        try
        {
            m_SUT.setRemoteSystemEncryption(null);
            m_SUT.queueMessage(m_RemoteId, payload, null);
            fail("Expected exception as the remote encryption service is not available.");
        }
        catch (IllegalStateException e)
        {
            //expected exception
        }
    }
/**
     * Verify that an exception is thrown in the event that no remote encryption service is set and the
     * queue method without the encryption parameter is called.
     */
Verify that an exception is thrown in the event that no remote encryption service is set and the
queue method without the encryption parameter is called.
Verify that an exception is thrown in the event that no remote encryption service is set and the queue method without the encryption parameter is called .
@Test
    public void testQueueBaseMessageRemoteEncryptionServiceException() throws IOException
    {
        ControllerInfoData systemInfoData = ControllerInfoData.newBuilder().setName("blah").build();
        TerraHarvestMessage request = 
                createMessageWithDestSource(m_LocalId, m_RemoteId, 0 , Namespace.Base, systemInfoData);
        TerraHarvestPayload payload = TerraHarvestPayload.parseFrom(request.getTerraHarvestPayload());
        try
        {
            m_SUT.setRemoteSystemEncryption(null);
            m_SUT.queueMessage(m_RemoteId, payload, null);
            fail("Expected exception as the remote encryption service is not available.");
        }
        catch (IllegalStateException e)
        {
        }
    }
@ Test public void testQueueBaseMessageRemoteEncryptionServiceException ( ) throws IOException { ControllerInfoData systemInfoData = ControllerInfoData . newBuilder ( ) . setName ( "blah" ) . build ( ) ; TerraHarvestMessage request = createMessageWithDestSource ( m_LocalId , m_RemoteId , 0 , Namespace . Base , systemInfoData ) ; TerraHarvestPayload payload = TerraHarvestPayload . parseFrom ( request . getTerraHarvestPayload ( ) ) ; try { m_SUT . setRemoteSystemEncryption ( null ) ; m_SUT . queueMessage ( m_RemoteId , payload , null ) ; fail ( "Expected exception as the remote encryption service is not available." ) ; } catch ( IllegalStateException e ) { } }
Verify that an exception is thrown in the event that no remote encryption service is set and the
 queue method without the encryption parameter is called.
Verify that an exception is thrown in the event that no remote encryption service is set and the queue method without the encryption parameter is called .
// construct data message to send //expected exception