mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestControllerConfigurationMgrImpl.java
@Test
    public void testGetFactoryConfigurations()
    {
        Map<String, ConfigAdminModel> configs = new HashMap<String, ConfigAdminModel>();
        List<ConfigAdminModel> conifgList = new ArrayList<ConfigAdminModel>(configs.values());
        
        when(m_SysConfigMgr.getFactoryConfigurationsByFactoryPidAsync(25, "factory pid")).thenReturn(configs);
        
        assertThat(m_SUT.getFactoryConfigurationsAsync(25, "factory pid"), is(conifgList));
        
        when(m_SysConfigMgr.getFactoryConfigurationsByFactoryPidAsync(25, "factory pid")).thenReturn(null);
        
        assertThat(m_SUT.getFactoryConfigurationsAsync(25, "factory pid").isEmpty(), is(true));
    }
/**
     * Test the get factory configurations method.
     * Verify that the appropriate list of configuration models is returned.
     */
Test the get factory configurations method.
Verify that the appropriate list of configuration models is returned.
Test the get factory configurations method . Verify that the appropriate list of configuration models is returned .
@Test
    public void testGetFactoryConfigurations()
    {
        Map<String, ConfigAdminModel> configs = new HashMap<String, ConfigAdminModel>();
        List<ConfigAdminModel> conifgList = new ArrayList<ConfigAdminModel>(configs.values());
        when(m_SysConfigMgr.getFactoryConfigurationsByFactoryPidAsync(25, "factory pid")).thenReturn(configs);
        assertThat(m_SUT.getFactoryConfigurationsAsync(25, "factory pid"), is(conifgList));
        when(m_SysConfigMgr.getFactoryConfigurationsByFactoryPidAsync(25, "factory pid")).thenReturn(null);
        assertThat(m_SUT.getFactoryConfigurationsAsync(25, "factory pid").isEmpty(), is(true));
    }
@ Test public void testGetFactoryConfigurations ( ) { Map < String , ConfigAdminModel > configs = new HashMap < String , ConfigAdminModel > ( ) ; List < ConfigAdminModel > conifgList = new ArrayList < ConfigAdminModel > ( configs . values ( ) ) ; when ( m_SysConfigMgr . getFactoryConfigurationsByFactoryPidAsync ( 25 , "factory pid" ) ) . thenReturn ( configs ) ; assertThat ( m_SUT . getFactoryConfigurationsAsync ( 25 , "factory pid" ) , is ( conifgList ) ) ; when ( m_SysConfigMgr . getFactoryConfigurationsByFactoryPidAsync ( 25 , "factory pid" ) ) . thenReturn ( null ) ; assertThat ( m_SUT . getFactoryConfigurationsAsync ( 25 , "factory pid" ) . isEmpty ( ) , is ( true ) ) ; }
Test the get factory configurations method.
Test the get factory configurations method .