mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestSystemConfigurationImpl.java
@Test
    public void testGetFactoryConfigurationsByFactoryPid() throws SecurityException, IllegalArgumentException, 
        NoSuchFieldException, IllegalAccessException
    {
        setupConfigurations();
        
        Map<String, ConfigAdminModel> factoryConfigs = 
                m_SUT.getFactoryConfigurationsByFactoryPidAsync(25, "factory PID");
        
        assertThat(factoryConfigs.size(), is(2));
        ConfigAdminModel config = factoryConfigs.get("factory config 1");
        assertThat(config.getBundleLocation(), is("location"));
        assertThat(config.getPid(), is("factory config 1"));
        assertThat(config.getFactoryPid(), is("factory PID"));
        
        config = factoryConfigs.get("factory config 2");
        assertThat(config.getBundleLocation(), is("location"));
        assertThat(config.getPid(), is("factory config 2"));
        assertThat(config.getFactoryPid(), is("factory PID"));
        
        //Verify that null is returned if no factory configuration with the specified PID exists.
        assertThat(m_SUT.getFactoryConfigurationsByFactoryPidAsync(25, "nada"), is(nullValue()));
    }
/**
     * Test getting a list of all factory configuration for the specified factory.
     * Verify that the list returned contains the appropriate factory configurations.
     * Verify that null is returned if the factory configuration does not exist.
     */
Test getting a list of all factory configuration for the specified factory.
Verify that the list returned contains the appropriate factory configurations.
Verify that null is returned if the factory configuration does not exist.
Test getting a list of all factory configuration for the specified factory . Verify that the list returned contains the appropriate factory configurations . Verify that null is returned if the factory configuration does not exist .
@Test
    public void testGetFactoryConfigurationsByFactoryPid() throws SecurityException, IllegalArgumentException, 
        NoSuchFieldException, IllegalAccessException
    {
        setupConfigurations();
        Map<String, ConfigAdminModel> factoryConfigs = 
                m_SUT.getFactoryConfigurationsByFactoryPidAsync(25, "factory PID");
        assertThat(factoryConfigs.size(), is(2));
        ConfigAdminModel config = factoryConfigs.get("factory config 1");
        assertThat(config.getBundleLocation(), is("location"));
        assertThat(config.getPid(), is("factory config 1"));
        assertThat(config.getFactoryPid(), is("factory PID"));
        config = factoryConfigs.get("factory config 2");
        assertThat(config.getBundleLocation(), is("location"));
        assertThat(config.getPid(), is("factory config 2"));
        assertThat(config.getFactoryPid(), is("factory PID"));
        assertThat(m_SUT.getFactoryConfigurationsByFactoryPidAsync(25, "nada"), is(nullValue()));
    }
@ Test public void testGetFactoryConfigurationsByFactoryPid ( ) throws SecurityException , IllegalArgumentException , NoSuchFieldException , IllegalAccessException { setupConfigurations ( ) ; Map < String , ConfigAdminModel > factoryConfigs = m_SUT . getFactoryConfigurationsByFactoryPidAsync ( 25 , "factory PID" ) ; assertThat ( factoryConfigs . size ( ) , is ( 2 ) ) ; ConfigAdminModel config = factoryConfigs . get ( "factory config 1" ) ; assertThat ( config . getBundleLocation ( ) , is ( "location" ) ) ; assertThat ( config . getPid ( ) , is ( "factory config 1" ) ) ; assertThat ( config . getFactoryPid ( ) , is ( "factory PID" ) ) ; config = factoryConfigs . get ( "factory config 2" ) ; assertThat ( config . getBundleLocation ( ) , is ( "location" ) ) ; assertThat ( config . getPid ( ) , is ( "factory config 2" ) ) ; assertThat ( config . getFactoryPid ( ) , is ( "factory PID" ) ) ; assertThat ( m_SUT . getFactoryConfigurationsByFactoryPidAsync ( 25 , "nada" ) , is ( nullValue ( ) ) ) ; }
Test getting a list of all factory configuration for the specified factory.
Test getting a list of all factory configuration for the specified factory .
//Verify that null is returned if no factory configuration with the specified PID exists.