mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/transport/TestTransportMessageListener.java
@SuppressWarnings("unchecked")
    @Test
    public void testActivate()
    {

        @SuppressWarnings("rawtypes")
        ArgumentCaptor<Dictionary> propertiesCap = ArgumentCaptor.forClass(Dictionary.class);
        
        //verify that the service is being registered
        verify(m_Context).registerService(eq(EventHandler.class), eq(m_SUT), propertiesCap.capture());
        
        //ensure that the event topic is set
        assertThat((String)propertiesCap.getValue().get("event.topics"), is(TransportLayer.TOPIC_PACKET_RECEIVED));
        
        //ensure that property values are set and are being reflected in event filter
        assertThat((String)propertiesCap.getValue().get("event.filter"), 
                is("(&(obj.name=transportBob)(source.addr.desc=remoteBurt)(dest.addr.desc=localBill))"));     
    }
/**
     * Method tests that a) configuration properties (messageAddress and transportName) are being properly set
     * and b) the Event Handler is being registered and has the appropriate event topic and filter.  
     * 
     */
Method tests that a) configuration properties (messageAddress and transportName) are being properly set
and b) the Event Handler is being registered and has the appropriate event topic and filter.
Method tests that a ) configuration properties ( messageAddress and transportName ) are being properly set and b ) the Event Handler is being registered and has the appropriate event topic and filter .
@SuppressWarnings("unchecked")
    @Test
    public void testActivate()
    {
        @SuppressWarnings("rawtypes")
        ArgumentCaptor<Dictionary> propertiesCap = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_Context).registerService(eq(EventHandler.class), eq(m_SUT), propertiesCap.capture());
        assertThat((String)propertiesCap.getValue().get("event.topics"), is(TransportLayer.TOPIC_PACKET_RECEIVED));
        assertThat((String)propertiesCap.getValue().get("event.filter"), 
                is("(&(obj.name=transportBob)(source.addr.desc=remoteBurt)(dest.addr.desc=localBill))"));     
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testActivate ( ) { @ SuppressWarnings ( "rawtypes" ) ArgumentCaptor < Dictionary > propertiesCap = ArgumentCaptor . forClass ( Dictionary . class ) ; verify ( m_Context ) . registerService ( eq ( EventHandler . class ) , eq ( m_SUT ) , propertiesCap . capture ( ) ) ; assertThat ( ( String ) propertiesCap . getValue ( ) . get ( "event.topics" ) , is ( TransportLayer . TOPIC_PACKET_RECEIVED ) ) ; assertThat ( ( String ) propertiesCap . getValue ( ) . get ( "event.filter" ) , is ( "(&(obj.name=transportBob)(source.addr.desc=remoteBurt)(dest.addr.desc=localBill))" ) ) ; }
Method tests that a) configuration properties (messageAddress and transportName) are being properly set
 and b) the Event Handler is being registered and has the appropriate event topic and filter.
Method tests that a ) configuration properties ( messageAddress and transportName ) are being properly set and b ) the Event Handler is being registered and has the appropriate event topic and filter .
//verify that the service is being registered //ensure that the event topic is set //ensure that property values are set and are being reflected in event filter