test_class.declarator: mapper = JsonUtils.getMapper()
test_class.modifier: private
test_class.original_string: private ObjectMapper mapper = JsonUtils.getMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: mergeStrategy = mergeStrategy().mergeEncodedObjects("fieldFormatMap").encodedArrayWithKey("fields", "name")
test_class.modifier: private
test_class.original_string: private JsonMerger.MergeStrategy mergeStrategy = mergeStrategy().mergeEncodedObjects("fieldFormatMap").encodedArrayWithKey("fields", "name");
test_class.type: JsonMerger.MergeStrategy
test_class.var_name: mergeStrategy
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/util/JsonMergerTest.java
test_class.identifier: JsonMergerTest
test_case.body: @Test
  	public void mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson() throws Exception {
  		// Given
  		JsonNode sourceDefinitions = mapper.readTree("{\"fields\": \"[]\", \"fieldFormatMap\": \"invalid\"}");
  		JsonNode stagemonitorDefinitions = mapper.readTree("{\"fields\": \"[{\\\"name\\\": \\\"fooField\\\", \\\"value\\\": \\\"new\\\"}]\", \"fieldFormatMap\": \"{\\\"foo\\\": {\\\"name\\\": \\\"fooNew\\\"}}\"}");
  
  		// Then
  		assertThatExceptionOfType(JsonParseException.class).isThrownBy(() -> JsonMerger.merge(sourceDefinitions, stagemonitorDefinitions, mergeStrategy))
  				.withMessageContaining("Unrecognized token 'invalid': was expecting ('true', 'false' or 'null')");
  	}
test_case.class_method_signature: JsonMergerTest.mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson()
test_case.full_signature: @Test public void mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson()
test_case.identifier: mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson
test_case.invocations: readTree readTree withMessageContaining isThrownBy assertThatExceptionOfType merge
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mergeDefinitions_ThrowsIllegalArgumentExceptionOnInvalidFieldFormatJson()
focal_class.declarator: mapper = JsonUtils.getMapper()
focal_class.modifier: private static final
focal_class.original_string: private static final ObjectMapper mapper = JsonUtils.getMapper();
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.declarator: defaultMerger = new SimpleMerger()
focal_class.modifier: private static final
focal_class.original_string: private static final Merger defaultMerger = new SimpleMerger();
focal_class.type: Merger
focal_class.var_name: defaultMerger
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/util/JsonMerger.java
focal_class.identifier: JsonMerger
focal_class.class_method_signature: JsonMerger.merge(JsonNode source, JsonNode replacement)
focal_class.full_signature: public static JsonNode merge(JsonNode source, JsonNode replacement)
focal_class.identifier: merge
focal_class.modifiers: public static
focal_class.parameters: (JsonNode source, JsonNode replacement)
focal_class.return: JsonNode
focal_class.signature: JsonNode merge(JsonNode source, JsonNode replacement)
focal_class.class_method_signature: JsonMerger.merge(JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy)
focal_class.full_signature: public static JsonNode merge(JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy)
focal_class.identifier: merge
focal_class.modifiers: public static
focal_class.parameters: (JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy)
focal_class.return: JsonNode
focal_class.signature: JsonNode merge(JsonNode source, JsonNode replacement, MergeStrategy mergeStrategy)
focal_class.class_method_signature: JsonMerger.groupArrayElementsByKey(ArrayNode fields, String key)
focal_class.full_signature: private static Map<String, JsonNode> groupArrayElementsByKey(ArrayNode fields, String key)
focal_class.identifier: groupArrayElementsByKey
focal_class.modifiers: private static
focal_class.parameters: (ArrayNode fields, String key)
focal_class.return: Map<String, JsonNode>
focal_class.signature: Map<String, JsonNode> groupArrayElementsByKey(ArrayNode fields, String key)
focal_class.class_method_signature: JsonMerger.collectIteratorToSet(Iterator<T> iterator)
focal_class.full_signature: private static Set<T> collectIteratorToSet(Iterator<T> iterator)
focal_class.identifier: collectIteratorToSet
focal_class.modifiers: private static
focal_class.parameters: (Iterator<T> iterator)
focal_class.return: Set<T>
focal_class.signature: Set<T> collectIteratorToSet(Iterator<T> iterator)
focal_class.class_method_signature: JsonMerger.tryDecode(JsonNode encodedNode, T defaultValue, String fieldName)
focal_class.full_signature: private static T tryDecode(JsonNode encodedNode, T defaultValue, String fieldName)
focal_class.identifier: tryDecode
focal_class.modifiers: private static
focal_class.parameters: (JsonNode encodedNode, T defaultValue, String fieldName)
focal_class.return: T
focal_class.signature: T tryDecode(JsonNode encodedNode, T defaultValue, String fieldName)
focal_class.class_method_signature: JsonMerger.mergeStrategy()
focal_class.full_signature: public static MergeStrategy mergeStrategy()
focal_class.identifier: mergeStrategy
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: MergeStrategy
focal_class.signature: MergeStrategy mergeStrategy()
focal_method.body: public static JsonNode merge(JsonNode source, JsonNode replacement) throws IOException {
  		return new MergeStrategy().execute(source, replacement);
  	}
focal_method.class_method_signature: JsonMerger.merge(JsonNode source, JsonNode replacement)
focal_method.full_signature: public static JsonNode merge(JsonNode source, JsonNode replacement)
focal_method.identifier: merge
focal_method.invocations: execute
focal_method.modifiers: public static
focal_method.parameters: (JsonNode source, JsonNode replacement)
focal_method.return: JsonNode
focal_method.signature: JsonNode merge(JsonNode source, JsonNode replacement)