mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestSystemMetatypeMgrImpl.java
@SuppressWarnings("unchecked")
    @Test
    public void testGetFactoryInformation() throws SecurityException, NoSuchFieldException, IllegalArgumentException, 
        IllegalAccessException
    {
        assertThat(m_SUT.getFactoryInformationAsync(CONTROLLERID, "factory PID"), is(nullValue()));
        
        //Added controller and meta type model to map for meta type information.
        Field configMap = m_SUT.getClass().getDeclaredField("m_MetatypeListFactories");
        configMap.setAccessible(true);
        Map<Integer, List<MetaTypeModel>> map = (Map<Integer, List<MetaTypeModel>>)configMap.get(m_SUT);
        MetaTypeModel model = new MetaTypeModel("factory PID", BUNDLEID);
        List<MetaTypeModel> modelList = new ArrayList<MetaTypeModel>();
        modelList.add(model);
        map.put(CONTROLLERID, modelList);
        
        assertThat(m_SUT.getFactoryInformationAsync(CONTROLLERID, "factory PID"), is(model));
    }
/**
     * Test the get factory information method. 
     * Verify that null is returned if the meta type information cannot be found for the factory PID. 
     * Verify that the meta type information is returned for the specified factory PID.
     */
Test the get factory information method.
Verify that null is returned if the meta type information cannot be found for the factory PID.
Verify that the meta type information is returned for the specified factory PID.
Test the get factory information method . Verify that null is returned if the meta type information cannot be found for the factory PID . Verify that the meta type information is returned for the specified factory PID .
@SuppressWarnings("unchecked")
    @Test
    public void testGetFactoryInformation() throws SecurityException, NoSuchFieldException, IllegalArgumentException, 
        IllegalAccessException
    {
        assertThat(m_SUT.getFactoryInformationAsync(CONTROLLERID, "factory PID"), is(nullValue()));
        Field configMap = m_SUT.getClass().getDeclaredField("m_MetatypeListFactories");
        configMap.setAccessible(true);
        Map<Integer, List<MetaTypeModel>> map = (Map<Integer, List<MetaTypeModel>>)configMap.get(m_SUT);
        MetaTypeModel model = new MetaTypeModel("factory PID", BUNDLEID);
        List<MetaTypeModel> modelList = new ArrayList<MetaTypeModel>();
        modelList.add(model);
        map.put(CONTROLLERID, modelList);
        assertThat(m_SUT.getFactoryInformationAsync(CONTROLLERID, "factory PID"), is(model));
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testGetFactoryInformation ( ) throws SecurityException , NoSuchFieldException , IllegalArgumentException , IllegalAccessException { assertThat ( m_SUT . getFactoryInformationAsync ( CONTROLLERID , "factory PID" ) , is ( nullValue ( ) ) ) ; Field configMap = m_SUT . getClass ( ) . getDeclaredField ( "m_MetatypeListFactories" ) ; configMap . setAccessible ( true ) ; Map < Integer , List < MetaTypeModel > > map = ( Map < Integer , List < MetaTypeModel > > ) configMap . get ( m_SUT ) ; MetaTypeModel model = new MetaTypeModel ( "factory PID" , BUNDLEID ) ; List < MetaTypeModel > modelList = new ArrayList < MetaTypeModel > ( ) ; modelList . add ( model ) ; map . put ( CONTROLLERID , modelList ) ; assertThat ( m_SUT . getFactoryInformationAsync ( CONTROLLERID , "factory PID" ) , is ( model ) ) ; }
Test the get factory information method.
Test the get factory information method .
//Added controller and meta type model to map for meta type information.