### Question:
JsonSchemaEmbedder { public JsonNode resolve(JsonNode input) { Map<String, JsonNode> resolvedReferences = new HashMap<>(); JsonNode output = input.deepCopy(); resolveInPlace(output, output, output, resolvedReferences, false); return output; } JsonSchemaEmbedder(String embedPath, JsonSchemaResolver jsonSchemaResolver); JsonNode resolve(JsonNode input);  }### Answer:
@Test public void shouldEmbedObject() { JsonNode input = YamlUtil.load( getClass().getResource("/json_schema_embedder/simple_object_input.yaml"), JsonNode.class); JsonSchemaEmbedder embedder = new JsonSchemaEmbedder( "/definitions", name -> YamlUtil.load( getClass().getResource("/json_schema_embedder/" + name), JsonNode.class)); JsonNode result = embedder.resolve(input); assertThat(result.at("/definitions").fieldNames()) .toIterable() .containsExactlyInAnyOrder( "Person", "Address", "Country", "simpleobjectsimplereferencedyaml"); assertThat(result.at("/definitions/Person/properties/address/$ref").asText()) .isEqualTo("#/definitions/Address"); assertThat(result.at("/definitions/Address/properties/country/$ref").asText()) .isEqualTo("#/definitions/Country"); assertThat(result.at("/definitions/simpleobjectsimplereferencedyaml/$schema").isMissingNode()) .isTrue(); }