mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/ccomms/TestTransportLayerMessageService.java
@Test
    public void testSetPropertyResponse() throws IOException
    {
        Message response = null;
        TransportLayerNamespace transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.SetPropertyResponse).build();
        TerraHarvestPayload payload = createPayload(transportLayerMessage);
        TerraHarvestMessage message = createTransportLayerMessage(transportLayerMessage);

        RemoteChannel channel = mock(RemoteChannel.class);

        m_SUT.handleMessage(message, payload, channel);

        // verify event is posted
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin).postEvent(eventCaptor.capture());
        Event postedEvent = eventCaptor.getValue();
        assertThat((Message)postedEvent.getProperty(RemoteConstants.EVENT_PROP_DATA_MESSAGE), is(response));
    }
/**
     * Verify set property response message when handled will set the data event property.
     */
Verify set property response message when handled will set the data event property.
Verify set property response message when handled will set the data event property .
@Test
    public void testSetPropertyResponse() throws IOException
    {
        Message response = null;
        TransportLayerNamespace transportLayerMessage = TransportLayerNamespace.newBuilder().
                setType(TransportLayerMessageType.SetPropertyResponse).build();
        TerraHarvestPayload payload = createPayload(transportLayerMessage);
        TerraHarvestMessage message = createTransportLayerMessage(transportLayerMessage);
        RemoteChannel channel = mock(RemoteChannel.class);
        m_SUT.handleMessage(message, payload, channel);
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin).postEvent(eventCaptor.capture());
        Event postedEvent = eventCaptor.getValue();
        assertThat((Message)postedEvent.getProperty(RemoteConstants.EVENT_PROP_DATA_MESSAGE), is(response));
    }
@ Test public void testSetPropertyResponse ( ) throws IOException { Message response = null ; TransportLayerNamespace transportLayerMessage = TransportLayerNamespace . newBuilder ( ) . setType ( TransportLayerMessageType . SetPropertyResponse ) . build ( ) ; TerraHarvestPayload payload = createPayload ( transportLayerMessage ) ; TerraHarvestMessage message = createTransportLayerMessage ( transportLayerMessage ) ; RemoteChannel channel = mock ( RemoteChannel . class ) ; m_SUT . handleMessage ( message , payload , channel ) ; ArgumentCaptor < Event > eventCaptor = ArgumentCaptor . forClass ( Event . class ) ; verify ( m_EventAdmin ) . postEvent ( eventCaptor . capture ( ) ) ; Event postedEvent = eventCaptor . getValue ( ) ; assertThat ( ( Message ) postedEvent . getProperty ( RemoteConstants . EVENT_PROP_DATA_MESSAGE ) , is ( response ) ) ; }
Verify set property response message when handled will set the data event property.
Verify set property response message when handled will set the data event property .
// verify event is posted