JsonReferenceProcessor { public JsonNode get(JsonReference ref) throws IOException, JsonReferenceException { JsonNode referencedNode; URI refUri = ref.getUri(); URL url = refUri.toURL(); referencedNode = read(url).at(ref.getPointer()); return referencedNode; }  boolean isCacheInMemory(); void setCacheInMemory(boolean cacheInMemory); int getMaxDepth(); void setMaxDepth(int maxDepth); boolean isStopOnCircular(); void setStopOnCircular(boolean stopOnCircular); boolean isPreserveRefs(); void setPreserveRefs(boolean preserveRefs); boolean isPreserveLocalRefs(); void setPreserveLocalRefs(boolean preserveLocalRefs); boolean isPreserveExternalRefs(); void setPreserveExternalRefs(boolean preserveExternalRefs); String getRefPrefix(); void setRefPrefix(String refPrefix); ObjectMapperFactory getMapperFactory(); void setMapperFactory(ObjectMapperFactory mapperFactory); JsonNode process(File file); JsonNode process(URL url); JsonNode process(JsonContext context, Set<JsonReference> processed); JsonNode process(JsonContext context); JsonNode process(JsonContext context, JsonNode node); JsonNode getReplacementNode(JsonNode node, JsonContext context); JsonReference getAbsoluteRef(JsonReference ref, JsonContext context); JsonContext resolveFromContextToContext(JsonReference ref, JsonContext context); JsonNode get(JsonReference ref); JsonNode read(URL url); JsonNode read(File file); JsonNode readFile(String fileString);  }
@Test public void testGet() throws IOException, JsonReferenceException { String refString = "http: JsonReference ref = JsonReference.fromString(refString); JsonNode jsonNode = (new JsonReferenceProcessor()).get(ref); ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(jsonNode); assertThat(json, equalTo("3")); }