@Test public void testProcessReferences() throws Exception { final String ENCODE = "encode.1"; final String ANALYSIS = "analysis.1"; String encodeOutput = getStringFromResourceFile("/context/encode.context.json"); String analysisOutput = getStringFromResourceFile("/context/analysis.context.json"); JsonNode referenceNode = getJsonNodeFromFile("/context/reference.json"); JsonNode expectedNode = getJsonNodeFromFile("/context/expectedResult.json"); jsonContext.addData(ENCODE, encodeOutput); jsonContext.addData(ANALYSIS, analysisOutput); ReferenceReplacementResult result = jsonContext.processReferences(referenceNode); Assert.assertEquals(objectMapper.readTree(result.getResult()), expectedNode); }
public ReferenceReplacementResult processReferences(Object object) { return processReferences(objectMapper.valueToTree(object), null); }
JsonContext { public ReferenceReplacementResult processReferences(Object object) { return processReferences(objectMapper.valueToTree(object), null); } }
JsonContext { public ReferenceReplacementResult processReferences(Object object) { return processReferences(objectMapper.valueToTree(object), null); } JsonContext(); }
JsonContext { public ReferenceReplacementResult processReferences(Object object) { return processReferences(objectMapper.valueToTree(object), null); } JsonContext(); void addData(String contextId, String jsonData); ReferenceReplacementResult processReferences(Object object); ReferenceReplacementResult processReferences(Object object, List<Map<String, JsonNode>> contextMaps); JsonReferenceReplacer getJsonReferenceReplacer(); }
JsonContext { public ReferenceReplacementResult processReferences(Object object) { return processReferences(objectMapper.valueToTree(object), null); } JsonContext(); void addData(String contextId, String jsonData); ReferenceReplacementResult processReferences(Object object); ReferenceReplacementResult processReferences(Object object, List<Map<String, JsonNode>> contextMaps); JsonReferenceReplacer getJsonReferenceReplacer();  }