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