test_class.declarator: provider1
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigProvider provider1;
test_class.type: ConfigProvider
test_class.var_name: provider1
test_class.declarator: provider2
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigProvider provider2;
test_class.type: ConfigProvider
test_class.var_name: provider2
test_class.declarator: container
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MicrobuleContainer container;
test_class.type: MicrobuleContainer
test_class.var_name: container
test_class.file: config/core/src/test/java/org/microbule/config/core/DefaultConfigServiceTest.java
test_class.identifier: DefaultConfigServiceTest
test_class.superclass: extends MockObjectTestCase
test_case.body: @Test
      @SuppressWarnings("unchecked")
      public void testWithNoConfigProviders() {
          final MapConfig config1 = new MapConfig();
          config1.addValue("a.one", "config1.a1");
          config1.addValue("b.one", "config1.b1");
          config1.addValue("b.two", "config1.b2");
  
          when(provider1.getConfig("a")).thenReturn(config1.filtered("a"));
          when(provider1.getConfig("b")).thenReturn(config1.filtered("b"));
          when(provider1.name()).thenReturn("provider1");
          when(provider1.priority()).thenReturn(ConfigUtils.DEFAULT_PRIORITY);
  
          final MapConfig config2 = new MapConfig();
          config2.addValue("a.one", "config2.a1");
          config2.addValue("a.three", "config2.a3");
          config2.addValue("b.one", "config2.b1");
          config2.addValue("b.three", "config2.b3");
  
          when(provider2.getConfig("a")).thenReturn(config2.filtered("a"));
          when(provider2.getConfig("b")).thenReturn(config2.filtered("b"));
          when(provider2.name()).thenReturn("provider2");
          when(provider2.priority()).thenReturn(ConfigUtils.PRIORITY_EXTERNAL);
  
  
          when(container.pluginSortedSet(same(ConfigProvider.class), any())).thenAnswer(invocation -> {
              SortedSet<ConfigProvider> set = new ConcurrentSkipListSet<>((Comparator<ConfigProvider>) invocation.getArgument(1));
              set.add(provider1);
              set.add(provider2);
              return set;
          });
  
          final DefaultConfigService configService = new DefaultConfigService(container);
  
          Config config = configService.createConfig("a");
          assertEquals("config1.a1", config.value("one").get());
  
          assertEquals("config2.b3", createWithoutLogging(() -> configService.createConfig("b")).value("three").get());
      }
test_case.class_method_signature: DefaultConfigServiceTest.testWithNoConfigProviders()
test_case.full_signature: @Test @SuppressWarnings("unchecked") public void testWithNoConfigProviders()
test_case.identifier: testWithNoConfigProviders
test_case.invocations: addValue addValue addValue thenReturn when getConfig filtered thenReturn when getConfig filtered thenReturn when name thenReturn when priority addValue addValue addValue addValue thenReturn when getConfig filtered thenReturn when getConfig filtered thenReturn when name thenReturn when priority thenAnswer when pluginSortedSet same any getArgument add add createConfig assertEquals get value assertEquals get value createWithoutLogging createConfig
test_case.modifiers: @Test @SuppressWarnings("unchecked") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWithNoConfigProviders()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(DefaultConfigService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(DefaultConfigService.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: providers
focal_class.modifier: private final
focal_class.original_string: private final Set<ConfigProvider> providers;
focal_class.type: Set<ConfigProvider>
focal_class.var_name: providers
focal_class.file: config/core/src/main/java/org/microbule/config/core/DefaultConfigService.java
focal_class.identifier: DefaultConfigService
focal_class.interfaces: implements ConfigService
focal_class.class_method_signature: DefaultConfigService.DefaultConfigService(MicrobuleContainer container)
focal_class.full_signature: @Inject public  DefaultConfigService(MicrobuleContainer container)
focal_class.identifier: DefaultConfigService
focal_class.modifiers: @Inject public
focal_class.parameters: (MicrobuleContainer container)
focal_class.signature:  DefaultConfigService(MicrobuleContainer container)
focal_class.class_method_signature: DefaultConfigService.createConfig(String... path)
focal_class.full_signature: @Override public Config createConfig(String... path)
focal_class.identifier: createConfig
focal_class.modifiers: @Override public
focal_class.parameters: (String... path)
focal_class.return: Config
focal_class.signature: Config createConfig(String... path)
focal_class.class_method_signature: DefaultConfigService.providerConfig(ConfigProvider provider, String[] path)
focal_class.full_signature: private Config providerConfig(ConfigProvider provider, String[] path)
focal_class.identifier: providerConfig
focal_class.modifiers: private
focal_class.parameters: (ConfigProvider provider, String[] path)
focal_class.return: Config
focal_class.signature: Config providerConfig(ConfigProvider provider, String[] path)
focal_method.body: @Override
      public Config createConfig(String... path) {
          return CompositeConfig.create(providers.stream().map(provider -> providerConfig(provider, path)).collect(Collectors.toList()));
      }
focal_method.class_method_signature: DefaultConfigService.createConfig(String... path)
focal_method.full_signature: @Override public Config createConfig(String... path)
focal_method.identifier: createConfig
focal_method.invocations: create collect map stream providerConfig toList
focal_method.modifiers: @Override public
focal_method.parameters: (String... path)
focal_method.return: Config
focal_method.signature: Config createConfig(String... path)