mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestFactoryRegistry.java
@SuppressWarnings("unchecked")
    @Test
    public void testActivation()
    {
        m_SUT.activate(m_BundleContext);

        @SuppressWarnings("rawtypes")
        ArgumentCaptor<Dictionary> dictCap = ArgumentCaptor.forClass(Dictionary.class);
        //twice because activation happens in setup too
        verify(m_BundleContext, times(2)).registerService(eq(EventHandler.class),
                Mockito.any(FactoryRegistryEventHandler.class), dictCap.capture());

        assertThat(Arrays.asList((String[])dictCap.getValue().get(EventConstants.EVENT_TOPIC)),
            hasItems(FactoryDescriptor.TOPIC_FACTORY_OBJ_CREATED,
                FactoryDescriptor.TOPIC_FACTORY_OBJ_NAME_UPDATED));

    }
/**
     * Verify registering for factory obj created and updated events during activation.
     */
Verify registering for factory obj created and updated events during activation.
Verify registering for factory obj created and updated events during activation .
@SuppressWarnings("unchecked")
    @Test
    public void testActivation()
    {
        m_SUT.activate(m_BundleContext);
        @SuppressWarnings("rawtypes")
        ArgumentCaptor<Dictionary> dictCap = ArgumentCaptor.forClass(Dictionary.class);
        verify(m_BundleContext, times(2)).registerService(eq(EventHandler.class),
                Mockito.any(FactoryRegistryEventHandler.class), dictCap.capture());
        assertThat(Arrays.asList((String[])dictCap.getValue().get(EventConstants.EVENT_TOPIC)),
            hasItems(FactoryDescriptor.TOPIC_FACTORY_OBJ_CREATED,
                FactoryDescriptor.TOPIC_FACTORY_OBJ_NAME_UPDATED));
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testActivation ( ) { m_SUT . activate ( m_BundleContext ) ; @ SuppressWarnings ( "rawtypes" ) ArgumentCaptor < Dictionary > dictCap = ArgumentCaptor . forClass ( Dictionary . class ) ; verify ( m_BundleContext , times ( 2 ) ) . registerService ( eq ( EventHandler . class ) , Mockito . any ( FactoryRegistryEventHandler . class ) , dictCap . capture ( ) ) ; assertThat ( Arrays . asList ( ( String [ ] ) dictCap . getValue ( ) . get ( EventConstants . EVENT_TOPIC ) ) , hasItems ( FactoryDescriptor . TOPIC_FACTORY_OBJ_CREATED , FactoryDescriptor . TOPIC_FACTORY_OBJ_NAME_UPDATED ) ) ; }
Verify registering for factory obj created and updated events during activation.
Verify registering for factory obj created and updated events during activation .
//twice because activation happens in setup too