StaticConfigDefinitionRepo implements ConfigDefinitionRepo { @Override public Map<ConfigDefinitionKey, ConfigDefinition> getConfigDefinitions() { return Collections.unmodifiableMap(configDefinitions); } StaticConfigDefinitionRepo();  StaticConfigDefinitionRepo(File definitionDir); @Override Map<ConfigDefinitionKey, ConfigDefinition> getConfigDefinitions(); @Override ConfigDefinition get(ConfigDefinitionKey key);  }
@Test public void testThatRepoIsCorrectlyInitialized() throws IOException { File topDir = folder.newFolder(); File defDir = new File(topDir, "classes"); defDir.mkdir(); addFile(defDir, new ConfigDefinitionKey("foo", "foons"), "namespace=foons\nval int\n"); addFile(defDir, new ConfigDefinitionKey("bar", "barns"), "namespace=barns\nval string\n"); ConfigDefinitionRepo repo = new StaticConfigDefinitionRepo(defDir); assertEquals(2, repo.getConfigDefinitions().size()); }