MavenProxyServerConfiguration { public static MavenProxyServerConfiguration loadFromFile(Path configFile) throws IOException { Yaml yaml = new Yaml(new Constructor(MavenProxyServerConfiguration.class)); try (InputStream in = newInputStream(configFile)) { return yaml.load(new BufferedInputStream(in)); } }  static MavenProxyServerConfiguration loadFromFile(Path configFile); Map<String, MavenRepository> getMavenRepositories(); public Map<String, MavenRepository> mavenRepositories; }
@Test @DisplayName("Parses sample-proxy-config.yaml correctly") public void parsesSampleConfigCorrectly() throws Exception { MavenProxyServerConfiguration proxyServerConfiguration = MavenProxyServerConfiguration.loadFromFile(sampleConfigFile); assertNotNull(proxyServerConfiguration); assertNotNull(proxyServerConfiguration.mavenRepositories); assertEquals(1, proxyServerConfiguration.mavenRepositories.size()); MavenRepository server1 = proxyServerConfiguration.mavenRepositories.get("server1"); assertNotNull(server1); assertEquals("https: }