@Test
public void mergeDefinitions_PreservesFieldsNotDefinedInReplacement() throws Exception {

	// Given
	JsonNode sourceDefinitions = mapper.readTree("{\"foo\": \"bar\", \"fields\": \"[{\\\"name\\\":\\\"sourceField\\\"}]\", \"fieldFormatMap\": \"{\\\"foo\\\": {\\\"name\\\": \\\"sourceFieldFormatMap\\\"}}\"}");
	JsonNode stagemonitorDefinitions = mapper.readTree("{\"fields\": \"[]\", \"fieldFormatMap\": \"{}\"}");
	// When
	JsonNode resultDefinitions = JsonMerger.merge(sourceDefinitions, stagemonitorDefinitions, mergeStrategy);
	// Then
	assertThat(resultDefinitions.get("foo").textValue()).isEqualTo("bar");
	assertThat(mapper.readTree(resultDefinitions.get("fields").textValue()))
			.isEqualTo(mapper.readTree(sourceDefinitions.get("fields").textValue()));
	assertThat(mapper.readTree(resultDefinitions.get("fieldFormatMap").textValue()))
			.isEqualTo(mapper.readTree(sourceDefinitions.get("fieldFormatMap").textValue()));
}