mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/impl/TestFactoryDescriptorImpl.java
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testRegisterServices() throws UnmarshalException
    {
        m_SUT.registerServices();
        
        String[] clazzes = {ManagedServiceFactory.class.getName(), MetaTypeProvider.class.getName()};
        ArgumentCaptor<Dictionary> props = ArgumentCaptor.forClass(Dictionary.class); 
        verify(m_MetaTypeProviderBundleContext).registerService(eq(clazzes), 
                Mockito.any(FactoryConfigurationService.class), props.capture());
        assertThat(props.getValue(), rawDictionaryHasEntry(Constants.SERVICE_PID, PRODUCT_TYPE + "Config"));
        assertThat(props.getValue(), rawDictionaryHasEntry(MetaTypeProvider.METATYPE_FACTORY_PID, 
                PRODUCT_TYPE + "Config"));
    }
/*
     * Verify init call will register services and fetch metatype information.
     */
Verify init call will register services and fetch metatype information.
Verify init call will register services and fetch metatype information .
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    public void testRegisterServices() throws UnmarshalException
    {
        m_SUT.registerServices();
        String[] clazzes = {ManagedServiceFactory.class.getName(), MetaTypeProvider.class.getName()};
        ArgumentCaptor<Dictionary> props = ArgumentCaptor.forClass(Dictionary.class); 
        verify(m_MetaTypeProviderBundleContext).registerService(eq(clazzes), 
                Mockito.any(FactoryConfigurationService.class), props.capture());
        assertThat(props.getValue(), rawDictionaryHasEntry(Constants.SERVICE_PID, PRODUCT_TYPE + "Config"));
        assertThat(props.getValue(), rawDictionaryHasEntry(MetaTypeProvider.METATYPE_FACTORY_PID, 
                PRODUCT_TYPE + "Config"));
    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) @ Test public void testRegisterServices ( ) throws UnmarshalException { m_SUT . registerServices ( ) ; String [ ] clazzes = { ManagedServiceFactory . class . getName ( ) , MetaTypeProvider . class . getName ( ) } ; ArgumentCaptor < Dictionary > props = ArgumentCaptor . forClass ( Dictionary . class ) ; verify ( m_MetaTypeProviderBundleContext ) . registerService ( eq ( clazzes ) , Mockito . any ( FactoryConfigurationService . class ) , props . capture ( ) ) ; assertThat ( props . getValue ( ) , rawDictionaryHasEntry ( Constants . SERVICE_PID , PRODUCT_TYPE + "Config" ) ) ; assertThat ( props . getValue ( ) , rawDictionaryHasEntry ( MetaTypeProvider . METATYPE_FACTORY_PID , PRODUCT_TYPE + "Config" ) ) ; }
Verify init call will register services and fetch metatype information.
Verify init call will register services and fetch metatype information .