FileSystemImplConfig { public List<String> getSchemes() { Config subConfig = config.subset(FS_IMPL_PREFIX, true); List<String> schemes = new ArrayList<String>(); for (String key : subConfig.keySet()) { if (key.endsWith(FS_IMPL_SUFFIX)) { schemes.add(key.substring(0, key.length() - FS_IMPL_SUFFIX.length())); } } return schemes; } FileSystemImplConfig(final Config config); List<String> getSchemes(); Config getSchemeConfig(final String scheme);  }
@Test public void testFileSystemImplConfigSuccess() { Map<String, String> configMap = new HashMap<>(); configMap.put("fs.http.impl", "org.apache.samza.HttpFileSystem"); configMap.put("fs.myscheme.impl", "org.apache.samza.MySchemeFileSystem"); Config conf = new MapConfig(configMap); FileSystemImplConfig manager = new FileSystemImplConfig(conf); assertEquals(2, manager.getSchemes().size()); assertEquals("http", manager.getSchemes().get(0)); assertEquals("myscheme", manager.getSchemes().get(1)); }