mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageSenderImpl.java
@Test
    public void testQueueMessageWithoutHandlerReg() throws IOException
    {
        //setup and activate component
        activateSetUp();

        //message as response
        AssetNamespace  nameMessage = AssetNamespace.newBuilder().
                 setType(AssetMessageType.ActivateResponse).build();
        TerraHarvestMessage request = createTerraHarvestMessage(0, Namespace.Asset, nameMessage, false);
        TerraHarvestPayload payLoadTest = TerraHarvestPayload.parseFrom(request.getTerraHarvestPayload());
            
        // properties for the event
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, null);
        props.put(RemoteConstants.EVENT_PROP_PAYLOAD, payLoadTest);
        props.put(RemoteConstants.EVENT_PROP_MESSAGE, request);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, m_RemoteId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE_MESSAGE, nameMessage);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.ActivateResponse.toString());

        Event event = new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);

        m_ResponseHandler.handleEvent(event);
        //verify
        verify(m_Handler, never()).handleResponse(Mockito.any(TerraHarvestMessage.class),
            Mockito.any(TerraHarvestPayload.class), Mockito.any(Message.class),Mockito.any(Message.class));
    }
/**
     * Verify that the event handler will not call a handler if no handler is associated with the message.
     */
Verify that the event handler will not call a handler if no handler is associated with the message.
Verify that the event handler will not call a handler if no handler is associated with the message .
@Test
    public void testQueueMessageWithoutHandlerReg() throws IOException
    {
        activateSetUp();
        AssetNamespace  nameMessage = AssetNamespace.newBuilder().
                 setType(AssetMessageType.ActivateResponse).build();
        TerraHarvestMessage request = createTerraHarvestMessage(0, Namespace.Asset, nameMessage, false);
        TerraHarvestPayload payLoadTest = TerraHarvestPayload.parseFrom(request.getTerraHarvestPayload());
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, null);
        props.put(RemoteConstants.EVENT_PROP_PAYLOAD, payLoadTest);
        props.put(RemoteConstants.EVENT_PROP_MESSAGE, request);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, m_RemoteId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE_MESSAGE, nameMessage);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.ActivateResponse.toString());
        Event event = new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
        m_ResponseHandler.handleEvent(event);
        verify(m_Handler, never()).handleResponse(Mockito.any(TerraHarvestMessage.class),
            Mockito.any(TerraHarvestPayload.class), Mockito.any(Message.class),Mockito.any(Message.class));
    }
@ Test public void testQueueMessageWithoutHandlerReg ( ) throws IOException { activateSetUp ( ) ; AssetNamespace nameMessage = AssetNamespace . newBuilder ( ) . setType ( AssetMessageType . ActivateResponse ) . build ( ) ; TerraHarvestMessage request = createTerraHarvestMessage ( 0 , Namespace . Asset , nameMessage , false ) ; TerraHarvestPayload payLoadTest = TerraHarvestPayload . parseFrom ( request . getTerraHarvestPayload ( ) ) ; final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , null ) ; props . put ( RemoteConstants . EVENT_PROP_PAYLOAD , payLoadTest ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE , request ) ; props . put ( RemoteConstants . EVENT_PROP_SOURCE_ID , m_RemoteId ) ; props . put ( RemoteConstants . EVENT_PROP_DEST_ID , 0 ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE_MESSAGE , nameMessage ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . Asset . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , AssetMessageType . ActivateResponse . toString ( ) ) ; Event event = new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; m_ResponseHandler . handleEvent ( event ) ; verify ( m_Handler , never ( ) ) . handleResponse ( Mockito . any ( TerraHarvestMessage . class ) , Mockito . any ( TerraHarvestPayload . class ) , Mockito . any ( Message . class ) , Mockito . any ( Message . class ) ) ; }
Verify that the event handler will not call a handler if no handler is associated with the message.
Verify that the event handler will not call a handler if no handler is associated with the message .
//setup and activate component //message as response // properties for the event //verify