mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/util/TestRemotePropertyConverter.java
@Test
    public final void testMapToComplexTypesMap_ObservationNative() throws Exception
    {
        // mock
        Map<String, Object> props = new HashMap<String, Object>();
        Observation obs = mock(Observation.class);
        props.put("obs", obs);
        
        ObservationGen.Observation genObs = TerraHarvestMessageHelper.getProtoObs();
        when(m_Converter.convertToProto(Mockito.any(Observation.class))).thenReturn(genObs);
        when(m_Converter.convertToJaxb(Mockito.any(ObservationGen.Observation.class))).
            thenReturn(obs);
        List<ComplexTypesMapEntry> complexMap = m_SUT.mapToComplexTypesMap(props, 
                RemoteTypesGen.LexiconFormat.Enum.NATIVE);
        
        // verify
        assertThat(complexMap.get(0).getValueCase(), is(ValueCase.OBSERVATIONNATIVE));
        assertThat(complexMap.get(0).getObservationNative(), is(genObs));
    }
/**
     * Test creating a protocol buffer message equivalent of property map.
     * 
     * Verify expected values are converted.
     */
Test creating a protocol buffer message equivalent of property map.

Verify expected values are converted.
Test creating a protocol buffer message equivalent of property map . Verify expected values are converted .
@Test
    public final void testMapToComplexTypesMap_ObservationNative() throws Exception
    {
        Map<String, Object> props = new HashMap<String, Object>();
        Observation obs = mock(Observation.class);
        props.put("obs", obs);
        ObservationGen.Observation genObs = TerraHarvestMessageHelper.getProtoObs();
        when(m_Converter.convertToProto(Mockito.any(Observation.class))).thenReturn(genObs);
        when(m_Converter.convertToJaxb(Mockito.any(ObservationGen.Observation.class))).
            thenReturn(obs);
        List<ComplexTypesMapEntry> complexMap = m_SUT.mapToComplexTypesMap(props, 
                RemoteTypesGen.LexiconFormat.Enum.NATIVE);
        assertThat(complexMap.get(0).getValueCase(), is(ValueCase.OBSERVATIONNATIVE));
        assertThat(complexMap.get(0).getObservationNative(), is(genObs));
    }
@ Test public final void testMapToComplexTypesMap_ObservationNative ( ) throws Exception { Map < String , Object > props = new HashMap < String , Object > ( ) ; Observation obs = mock ( Observation . class ) ; props . put ( "obs" , obs ) ; ObservationGen . Observation genObs = TerraHarvestMessageHelper . getProtoObs ( ) ; when ( m_Converter . convertToProto ( Mockito . any ( Observation . class ) ) ) . thenReturn ( genObs ) ; when ( m_Converter . convertToJaxb ( Mockito . any ( ObservationGen . Observation . class ) ) ) . thenReturn ( obs ) ; List < ComplexTypesMapEntry > complexMap = m_SUT . mapToComplexTypesMap ( props , RemoteTypesGen . LexiconFormat . Enum . NATIVE ) ; assertThat ( complexMap . get ( 0 ) . getValueCase ( ) , is ( ValueCase . OBSERVATIONNATIVE ) ) ; assertThat ( complexMap . get ( 0 ) . getObservationNative ( ) , is ( genObs ) ) ; }
Test creating a protocol buffer message equivalent of property map.
Test creating a protocol buffer message equivalent of property map .
// mock // verify