@Test public void mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson() throws Exception { JsonNode sourceDefinitions = mapper.readTree("{\"fields\": \"[]\", \"fieldFormatMap\": \"invalid\"}"); JsonNode stagemonitorDefinitions = mapper.readTree("{\"fields\": \"[{\\\"name\\\": \\\"fooField\\\", \\\"value\\\": \\\"new\\\"}]\", \"fieldFormatMap\": \"{\\\"foo\\\": {\\\"name\\\": \\\"fooNew\\\"}}\"}"); assertThatExceptionOfType(JsonParseException.class).isThrownBy(() -> JsonMerger.merge(sourceDefinitions, stagemonitorDefinitions, mergeStrategy)) .withMessageContaining("Unrecognized token 'invalid': was expecting ('true', 'false' or 'null')"); }
public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException { return new MergeStrategy().execute(source, replacement); }
JsonMerger { public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException { return new MergeStrategy().execute(source, replacement); } }
JsonMerger { public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException { return new MergeStrategy().execute(source, replacement); }  }
JsonMerger { public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException { return new MergeStrategy().execute(source, replacement); }  static JsonNode merge(JsonNode source, JsonNode replacement); static JsonNode merge(JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy); static MergeStrategy mergeStrategy(); }
JsonMerger { public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException { return new MergeStrategy().execute(source, replacement); }  static JsonNode merge(JsonNode source, JsonNode replacement); static JsonNode merge(JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy); static MergeStrategy mergeStrategy();  }