mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestFactoryServiceUtils.java
@Test
    public void testGetFactoryConfiguration() throws Exception
    {
        Configuration expectedConfig = mock(Configuration.class);
        when(configAdmin.listConfigurations("(service.pid=some-pid)")).thenReturn(new Configuration[] {expectedConfig});
        
        Configuration config = FactoryServiceUtils.getFactoryConfiguration(configAdmin, "some-pid");
        
        assertThat(config, is(expectedConfig));
    }
/**
     * Verify method returns properties from config admin.
     */
Verify method returns properties from config admin.
Verify method returns properties from config admin .
@Test
    public void testGetFactoryConfiguration() throws Exception
    {
        Configuration expectedConfig = mock(Configuration.class);
        when(configAdmin.listConfigurations("(service.pid=some-pid)")).thenReturn(new Configuration[] {expectedConfig});
        Configuration config = FactoryServiceUtils.getFactoryConfiguration(configAdmin, "some-pid");
        assertThat(config, is(expectedConfig));
    }
@ Test public void testGetFactoryConfiguration ( ) throws Exception { Configuration expectedConfig = mock ( Configuration . class ) ; when ( configAdmin . listConfigurations ( "(service.pid=some-pid)" ) ) . thenReturn ( new Configuration [ ] { expectedConfig } ) ; Configuration config = FactoryServiceUtils . getFactoryConfiguration ( configAdmin , "some-pid" ) ; assertThat ( config , is ( expectedConfig ) ) ; }
Verify method returns properties from config admin.
Verify method returns properties from config admin .