mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestFactoryServiceUtils.java
@Test
    public void testGetFactoryConfiguration_ConfigAdminException() throws Exception
    {
        when(configAdmin.listConfigurations("(service.pid=some-pid)")).thenThrow(new IOException());
        
        try
        {
            FactoryServiceUtils.getFactoryConfiguration(configAdmin, "some-pid");
            fail("Expecting wrapped exception as underlying service throws exception");
        }
        catch (FactoryException e)
        {
            
        }
    }
/**
     * Verify method throws exception if underlying config admin does
     */
Verify method throws exception if underlying config admin does
Verify method throws exception if underlying config admin does
@Test
    public void testGetFactoryConfiguration_ConfigAdminException() throws Exception
    {
        when(configAdmin.listConfigurations("(service.pid=some-pid)")).thenThrow(new IOException());
        try
        {
            FactoryServiceUtils.getFactoryConfiguration(configAdmin, "some-pid");
            fail("Expecting wrapped exception as underlying service throws exception");
        }
        catch (FactoryException e)
        {
        }
    }
@ Test public void testGetFactoryConfiguration_ConfigAdminException ( ) throws Exception { when ( configAdmin . listConfigurations ( "(service.pid=some-pid)" ) ) . thenThrow ( new IOException ( ) ) ; try { FactoryServiceUtils . getFactoryConfiguration ( configAdmin , "some-pid" ) ; fail ( "Expecting wrapped exception as underlying service throws exception" ) ; } catch ( FactoryException e ) { } }
Verify method throws exception if underlying config admin does
Verify method throws exception if underlying config admin does