test_class.declarator: temporaryFolder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.file: oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/BlobStoreFixtureProviderTest.java
test_class.identifier: BlobStoreFixtureProviderTest
test_case.body: @Test
      public void configLoading_OSGi() throws Exception {
          Dictionary<String, Object> p = new Hashtable<String, Object>();
          p.put("foo", "bar");
          p.put("a", 1);
          p.put("b", new int[]{1, 2});
  
          File config = new File(temporaryFolder.getRoot(), "test.config");
          try (OutputStream os = FileUtils.openOutputStream(config)) {
              ConfigurationHandler.write(os, p);
          }
  
          Properties p2 = BlobStoreFixtureProvider.loadConfig(config.getAbsolutePath());
          assertEquals("bar", p2.getProperty("foo"));
          assertEquals(1, p2.get("a"));
          assertArrayEquals(new int[]{1, 2}, (int[]) p2.get("b"));
      }
test_case.class_method_signature: BlobStoreFixtureProviderTest.configLoading_OSGi()
test_case.full_signature: @Test public void configLoading_OSGi()
test_case.identifier: configLoading_OSGi
test_case.invocations: put put put getRoot openOutputStream write loadConfig getAbsolutePath assertEquals getProperty assertEquals get assertArrayEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void configLoading_OSGi()
focal_class.file: oak-run-commons/src/main/java/org/apache/jackrabbit/oak/run/cli/BlobStoreFixtureProvider.java
focal_class.identifier: BlobStoreFixtureProvider
focal_class.class_method_signature: BlobStoreFixtureProvider.create(Options options)
focal_class.full_signature: @Nullable public static BlobStoreFixture create(Options options)
focal_class.identifier: create
focal_class.modifiers: @Nullable public static
focal_class.parameters: (Options options)
focal_class.return: BlobStoreFixture
focal_class.signature: BlobStoreFixture create(Options options)
focal_class.class_method_signature: BlobStoreFixtureProvider.loadConfig(String cfgPath)
focal_class.full_signature: static Properties loadConfig(String cfgPath)
focal_class.identifier: loadConfig
focal_class.modifiers: static
focal_class.parameters: (String cfgPath)
focal_class.return: Properties
focal_class.signature: Properties loadConfig(String cfgPath)
focal_class.class_method_signature: BlobStoreFixtureProvider.loadAndTransformProps(String cfgPath)
focal_class.full_signature: private static Properties loadAndTransformProps(String cfgPath)
focal_class.identifier: loadAndTransformProps
focal_class.modifiers: private static
focal_class.parameters: (String cfgPath)
focal_class.return: Properties
focal_class.signature: Properties loadAndTransformProps(String cfgPath)
focal_class.class_method_signature: BlobStoreFixtureProvider.asCloseable(final File dir)
focal_class.full_signature: private static Closeable asCloseable(final File dir)
focal_class.identifier: asCloseable
focal_class.modifiers: private static
focal_class.parameters: (final File dir)
focal_class.return: Closeable
focal_class.signature: Closeable asCloseable(final File dir)
focal_class.class_method_signature: BlobStoreFixtureProvider.asMap(Properties props)
focal_class.full_signature: private static Map<String, ?> asMap(Properties props)
focal_class.identifier: asMap
focal_class.modifiers: private static
focal_class.parameters: (Properties props)
focal_class.return: Map<String, ?>
focal_class.signature: Map<String, ?> asMap(Properties props)
focal_method.body: static Properties loadConfig(String cfgPath) throws IOException {
          String extension = FilenameUtils.getExtension(cfgPath);
          Properties props;
          if ("config".equals(extension)){
              props = loadAndTransformProps(cfgPath);
          } else {
              props = new Properties();
              try(InputStream is = FileUtils.openInputStream(new File(cfgPath))){
                  props.load(is);
              }
          }
  
          return props;
      }
focal_method.class_method_signature: BlobStoreFixtureProvider.loadConfig(String cfgPath)
focal_method.full_signature: static Properties loadConfig(String cfgPath)
focal_method.identifier: loadConfig
focal_method.invocations: getExtension equals loadAndTransformProps openInputStream load
focal_method.modifiers: static
focal_method.parameters: (String cfgPath)
focal_method.return: Properties
focal_method.signature: Properties loadConfig(String cfgPath)