mil.dod.th.ose.shared/test/mil/dod/th/ose/shared/TestEventUtils.java
@Test
    public void testCreateMap()
    {
        //Observation
        Observation obs = new Observation();
        
        //properties for event
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("Prop1", "value1");
        props.put("Prop2", obs);

        //create event
        Event event = new Event("TOPIC", props);

        //create prop map from event
        Map<String, Object> props2 = EventUtils.getEventProps(event);

        //topic will be added to the properties
        props.put(EventConstants.EVENT_TOPIC, "TOPIC");
        assertThat(props2, is(props));
    }
/**
     * Test getting the properties of an event in a map.
     */
Test getting the properties of an event in a map.
Test getting the properties of an event in a map .
@Test
    public void testCreateMap()
    {
        Observation obs = new Observation();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("Prop1", "value1");
        props.put("Prop2", obs);
        Event event = new Event("TOPIC", props);
        Map<String, Object> props2 = EventUtils.getEventProps(event);
        props.put(EventConstants.EVENT_TOPIC, "TOPIC");
        assertThat(props2, is(props));
    }
@ Test public void testCreateMap ( ) { Observation obs = new Observation ( ) ; Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( "Prop1" , "value1" ) ; props . put ( "Prop2" , obs ) ; Event event = new Event ( "TOPIC" , props ) ; Map < String , Object > props2 = EventUtils . getEventProps ( event ) ; props . put ( EventConstants . EVENT_TOPIC , "TOPIC" ) ; assertThat ( props2 , is ( props ) ) ; }
Test getting the properties of an event in a map.
Test getting the properties of an event in a map .
//Observation //properties for event //create event //create prop map from event //topic will be added to the properties