mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/util/TestRemotePropertyConverter.java
@Test
    public final void testMapToComplexTypesMap_ObservationInvalidFormat() throws Exception
    {
        // mock
        Map<String, Object> props = new HashMap<String, Object>();
        Observation obs = mock(Observation.class);
        props.put("obs", obs);

        when(m_Converter.convertToProto(Mockito.any(Observation.class))).
            thenThrow(new ObjectConverterException("object converter fail"));

        try
        {
            m_SUT.mapToComplexTypesMap(props, 
                    RemoteTypesGen.LexiconFormat.Enum.UUID_ONLY);
            fail("Expecting exception as format is invalid");
        }
        catch (UnsupportedOperationException e)
        {
            
        }
    }
/**
     * Verify requesting an invalid lexicon format causes an exception.
     */
Verify requesting an invalid lexicon format causes an exception.
Verify requesting an invalid lexicon format causes an exception .
@Test
    public final void testMapToComplexTypesMap_ObservationInvalidFormat() throws Exception
    {
        Map<String, Object> props = new HashMap<String, Object>();
        Observation obs = mock(Observation.class);
        props.put("obs", obs);
        when(m_Converter.convertToProto(Mockito.any(Observation.class))).
            thenThrow(new ObjectConverterException("object converter fail"));
        try
        {
            m_SUT.mapToComplexTypesMap(props, 
                    RemoteTypesGen.LexiconFormat.Enum.UUID_ONLY);
            fail("Expecting exception as format is invalid");
        }
        catch (UnsupportedOperationException e)
        {
        }
    }
@ Test public final void testMapToComplexTypesMap_ObservationInvalidFormat ( ) throws Exception { Map < String , Object > props = new HashMap < String , Object > ( ) ; Observation obs = mock ( Observation . class ) ; props . put ( "obs" , obs ) ; when ( m_Converter . convertToProto ( Mockito . any ( Observation . class ) ) ) . thenThrow ( new ObjectConverterException ( "object converter fail" ) ) ; try { m_SUT . mapToComplexTypesMap ( props , RemoteTypesGen . LexiconFormat . Enum . UUID_ONLY ) ; fail ( "Expecting exception as format is invalid" ) ; } catch ( UnsupportedOperationException e ) { } }
Verify requesting an invalid lexicon format causes an exception.
Verify requesting an invalid lexicon format causes an exception .
// mock