DataJsonNode { public String getId() { return jsonNode.get("id").asText(); } DataJsonNode(ObjectNode jsonNode); void removeAttribute(String name); String getDataClassName(); boolean match(String dataClassNameFullQualified); void renameAttribute(String previousAttributeName, String newAttributeName); void renameClass(Class<? extends FactoryBase<?,?>> newDataClass); DataJsonNode getChild(String attributeName); DataJsonNode getChild(String attributeName, int index); JsonNode getAttributeValue(String attribute); void setAttributeValue(String attribute, JsonNode jsonNode); V getAttributeValue(String attributeName, Class<V> valueClass, SimpleObjectMapper simpleObjectMapper); V getArrayAttributeValue(String attributeName, Class<V> valueClass, SimpleObjectMapper simpleObjectMapper, int index); String getAttributeIdValue(String attributeName); boolean isData(); List<DataJsonNode> collectChildrenFromRoot(); String getId(); D asData(Class<D> valueClass, SimpleObjectMapper simpleObjectMapper); List<String> getAttributes(); Map<String,DataJsonNode> collectChildrenMapFromRoot(); Map<String,DataJsonNode> collectChildrenMapFromRootCached(); void applyRemovedAttribute(DataStorageMetadataDictionary dataStorageMetadataDictionary); void applyRetypedAttribute(DataStorageMetadataDictionary dataStorageMetadataDictionary); void applyRemovedClasses(DataStorageMetadataDictionary dataStorageMetadataDictionary); void fixIdsDeepFromRoot(Map<String, DataJsonNode> idToChild); JsonNode getJsonNode();  }
@Test public void test_getChildrenFromRoot_id() { ExampleDataA exampleDataA = new ExampleDataA(); JsonNode jsonNode = ObjectMapperBuilder.build().writeValueAsTree(exampleDataA); DataJsonNode dataJsonNode = new DataJsonNode((ObjectNode) jsonNode); Assertions.assertEquals(exampleDataA.getId().toString(), dataJsonNode.getId()); }