@Test public void cannotLoadWithSyntaxErrors() throws IOException { Exception e = assertThrows(RuntimeException.class, () -> loadFromPath("classpath:/conf/origins/origins-with-syntax-error-for-configtest.yml")); assertThat(e.getMessage(), matchesPattern("Invalid YAML from classpath:conf/origins/origins-with-syntax-error-for-configtest.yml: Cannot deserialize instance of `java.util.ArrayList<com.hotels.styx.api.extension.service.BackendService>` out of VALUE_STRING token\n at \\[Source: .*\\]")); }
public static YamlApplicationsProvider loadFromPath(String path) { return new YamlApplicationsProvider(newResource(path)); }
YamlApplicationsProvider { public static YamlApplicationsProvider loadFromPath(String path) { return new YamlApplicationsProvider(newResource(path)); } }
YamlApplicationsProvider { public static YamlApplicationsProvider loadFromPath(String path) { return new YamlApplicationsProvider(newResource(path)); } private  YamlApplicationsProvider(String yamlText);  YamlApplicationsProvider(Resource resource); }
YamlApplicationsProvider { public static YamlApplicationsProvider loadFromPath(String path) { return new YamlApplicationsProvider(newResource(path)); } private  YamlApplicationsProvider(String yamlText);  YamlApplicationsProvider(Resource resource); static YamlApplicationsProvider loadFromPath(String path); static YamlApplicationsProvider loadFromText(String yamlText); static BackendServices loadApplicationsFrom(String path); BackendServices get(); }
YamlApplicationsProvider { public static YamlApplicationsProvider loadFromPath(String path) { return new YamlApplicationsProvider(newResource(path)); } private  YamlApplicationsProvider(String yamlText);  YamlApplicationsProvider(Resource resource); static YamlApplicationsProvider loadFromPath(String path); static YamlApplicationsProvider loadFromText(String yamlText); static BackendServices loadApplicationsFrom(String path); BackendServices get();  }