mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/utils/push/TestPushChannelsGenericEventHandler.java
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testRegisterAndUnregister()
    {
        m_SUT.setup();
        
        ArgumentCaptor<Dictionary> dictCaptor = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_BundleContext, times(1)).registerService(eq(EventHandler.class), 
                Mockito.any(EventHandler.class), dictCaptor.capture());
        
        Dictionary<String, Object> props = dictCaptor.getValue();
        
        assertThat(props.size(), is(1));
        assertThat((String)props.get(EventConstants.EVENT_TOPIC), is("mil/dod/th/ose/gui/webapp/*"));
        
        m_SUT.cleanup();
        
        verify(m_Registration, times(1)).unregister();
    }
/**
     * Verify that correct events are registered for
     */
Verify that correct events are registered for
Verify that correct events are registered for
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testRegisterAndUnregister()
    {
        m_SUT.setup();
        ArgumentCaptor<Dictionary> dictCaptor = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_BundleContext, times(1)).registerService(eq(EventHandler.class), 
                Mockito.any(EventHandler.class), dictCaptor.capture());
        Dictionary<String, Object> props = dictCaptor.getValue();
        assertThat(props.size(), is(1));
        assertThat((String)props.get(EventConstants.EVENT_TOPIC), is("mil/dod/th/ose/gui/webapp/*"));
        m_SUT.cleanup();
        verify(m_Registration, times(1)).unregister();
    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) @ Test public void testRegisterAndUnregister ( ) { m_SUT . setup ( ) ; ArgumentCaptor < Dictionary > dictCaptor = ArgumentCaptor . forClass ( Dictionary . class ) ; verify ( m_BundleContext , times ( 1 ) ) . registerService ( eq ( EventHandler . class ) , Mockito . any ( EventHandler . class ) , dictCaptor . capture ( ) ) ; Dictionary < String , Object > props = dictCaptor . getValue ( ) ; assertThat ( props . size ( ) , is ( 1 ) ) ; assertThat ( ( String ) props . get ( EventConstants . EVENT_TOPIC ) , is ( "mil/dod/th/ose/gui/webapp/*" ) ) ; m_SUT . cleanup ( ) ; verify ( m_Registration , times ( 1 ) ) . unregister ( ) ; }
Verify that correct events are registered for
Verify that correct events are registered for