FsSettingsParser { public static FsSettings fromYaml(String yaml) throws IOException { return ymlMapper.readValue(yaml, FsSettings.class); }  static String toYaml(FsSettings settings); static FsSettings fromJson(String json); static FsSettings fromYaml(String yaml);  }
@Test public void testWithSimplestYamlJobFile() throws IOException { String yaml = "name: \"test\""; logger.info("-> testing settings: [{}]", yaml); defaultSettingsTester(FsSettingsParser.fromYaml(yaml)); }
@Test public void testPasswordIsReadableFromYamlSettings() throws IOException { String yaml = "name: \"test_password_is_readable\"\n" + "fs:\n" + " url: \"/path/to/docs\"\n" + "server:\n" + " username: \"dadoonet\"\n" + " password: \"" + SERVER_FULL.getPassword() + "\"\n" + "elasticsearch:\n" + " username: \"username\"\n" + " password: \"" + ELASTICSEARCH_FULL.getPassword() + "\"\n"; logger.info("-> testing settings: [{}]", yaml); checkPasswordSettings(FsSettingsParser.fromYaml(yaml)); }