mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/observation/TestRemoteObservationListener.java
private Event findObservationsEvent() throws ObjectConverterException
    {
        //Mock the JAXB observations that correlate to the protocol observations.
        final Observation jaxbObs1 = mock(Observation.class);
        final Observation jaxbObs2 = mock(Observation.class);
        final Observation jaxbObs3 = mock(Observation.class);
        
        //observations to return
        final ObservationGen.Observation obs1 = TerraHarvestMessageHelper.getProtoObs();
        final ObservationGen.Observation obs2 = TerraHarvestMessageHelper.getProtoObs();
        final ObservationGen.Observation obs3 = TerraHarvestMessageHelper.getProtoObs();
        
        when(jaxbObs1.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs1.getUuid()));
        when(jaxbObs2.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs2.getUuid()));
        when(jaxbObs3.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs3.getUuid()));
        
        when(m_Converter.convertToJaxb(obs1)).thenReturn(jaxbObs1);
        when(m_Converter.convertToJaxb(obs2)).thenReturn(jaxbObs2);
        when(m_Converter.convertToJaxb(obs3)).thenReturn(jaxbObs3);

        //message
        FindObservationByUUIDResponseData response = FindObservationByUUIDResponseData.newBuilder().
            addObservationNative(obs3).
            addObservationNative(obs2).
            addObservationNative(obs1).build();

        return createEvent(response, Namespace.ObservationStore , 
            ObservationStoreMessageType.FindObservationByUUIDResponse.toString());
    }
/**
     * Create a find observation event, this event contains the fields needed by the remote observation listener
     * that would be present in an actual remote message received event for a find observation response message.
     */
Create a find observation event, this event contains the fields needed by the remote observation listener
that would be present in an actual remote message received event for a find observation response message.
Create a find observation event this event contains the fields needed by the remote observation listener that would be present in an actual remote message received event for a find observation response message .
private Event findObservationsEvent() throws ObjectConverterException
    {
        final Observation jaxbObs1 = mock(Observation.class);
        final Observation jaxbObs2 = mock(Observation.class);
        final Observation jaxbObs3 = mock(Observation.class);
        final ObservationGen.Observation obs1 = TerraHarvestMessageHelper.getProtoObs();
        final ObservationGen.Observation obs2 = TerraHarvestMessageHelper.getProtoObs();
        final ObservationGen.Observation obs3 = TerraHarvestMessageHelper.getProtoObs();
        when(jaxbObs1.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs1.getUuid()));
        when(jaxbObs2.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs2.getUuid()));
        when(jaxbObs3.getUuid()).thenReturn(SharedMessageUtils.convertProtoUUIDtoUUID(obs3.getUuid()));
        when(m_Converter.convertToJaxb(obs1)).thenReturn(jaxbObs1);
        when(m_Converter.convertToJaxb(obs2)).thenReturn(jaxbObs2);
        when(m_Converter.convertToJaxb(obs3)).thenReturn(jaxbObs3);
        FindObservationByUUIDResponseData response = FindObservationByUUIDResponseData.newBuilder().
            addObservationNative(obs3).
            addObservationNative(obs2).
            addObservationNative(obs1).build();
        return createEvent(response, Namespace.ObservationStore , 
            ObservationStoreMessageType.FindObservationByUUIDResponse.toString());
    }
private Event findObservationsEvent ( ) throws ObjectConverterException { final Observation jaxbObs1 = mock ( Observation . class ) ; final Observation jaxbObs2 = mock ( Observation . class ) ; final Observation jaxbObs3 = mock ( Observation . class ) ; final ObservationGen . Observation obs1 = TerraHarvestMessageHelper . getProtoObs ( ) ; final ObservationGen . Observation obs2 = TerraHarvestMessageHelper . getProtoObs ( ) ; final ObservationGen . Observation obs3 = TerraHarvestMessageHelper . getProtoObs ( ) ; when ( jaxbObs1 . getUuid ( ) ) . thenReturn ( SharedMessageUtils . convertProtoUUIDtoUUID ( obs1 . getUuid ( ) ) ) ; when ( jaxbObs2 . getUuid ( ) ) . thenReturn ( SharedMessageUtils . convertProtoUUIDtoUUID ( obs2 . getUuid ( ) ) ) ; when ( jaxbObs3 . getUuid ( ) ) . thenReturn ( SharedMessageUtils . convertProtoUUIDtoUUID ( obs3 . getUuid ( ) ) ) ; when ( m_Converter . convertToJaxb ( obs1 ) ) . thenReturn ( jaxbObs1 ) ; when ( m_Converter . convertToJaxb ( obs2 ) ) . thenReturn ( jaxbObs2 ) ; when ( m_Converter . convertToJaxb ( obs3 ) ) . thenReturn ( jaxbObs3 ) ; FindObservationByUUIDResponseData response = FindObservationByUUIDResponseData . newBuilder ( ) . addObservationNative ( obs3 ) . addObservationNative ( obs2 ) . addObservationNative ( obs1 ) . build ( ) ; return createEvent ( response , Namespace . ObservationStore , ObservationStoreMessageType . FindObservationByUUIDResponse . toString ( ) ) ; }
Create a find observation event, this event contains the fields needed by the remote observation listener
 that would be present in an actual remote message received event for a find observation response message.
Create a find observation event this event contains the fields needed by the remote observation listener that would be present in an actual remote message received event for a find observation response message .
//Mock the JAXB observations that correlate to the protocol observations. //observations to return //message