@Test public void mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldsType() throws Exception { JsonNode sourceDefinitions = mapper.readTree("{\"fields\": \"{}\", \"fieldFormatMap\": \"{\\\"foo\\\": {\\\"name\\\": \\\"fooOld\\\"}}\"}"); JsonNode stagemonitorDefinitions = mapper.readTree("{\"fields\": \"[{\\\"name\\\": \\\"fooField\\\", \\\"value\\\": \\\"new\\\"}]\", \"fieldFormatMap\": \"{\\\"foo\\\": {\\\"name\\\": \\\"fooNew\\\"}}\"}"); assertThatIllegalArgumentException().isThrownBy(() -> JsonMerger.merge(sourceDefinitions, stagemonitorDefinitions, mergeStrategy)) .withMessage("error after decodingfields. Expected decoded type to be ARRAY, but encountered OBJECT"); }
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();  }