### Question:
ElasticsearchJson { static void visitMappingProperties(ObjectNode mapping, BiConsumer<String, String> consumer) { Objects.requireNonNull(mapping, "mapping"); Objects.requireNonNull(consumer, "consumer"); visitMappingProperties(new ArrayDeque<>(), mapping, consumer); } private  ElasticsearchJson();   }### Answer:
@Test void reservedKeywordMapping() throws Exception { ObjectNode mapping = mapper.readValue("{properties:{" + "type:{type:'text'}," + "keyword:{type:'keyword'}," + "properties:{type:'long'}" + "}}", ObjectNode.class); Map<String, String> result = new HashMap<>(); ElasticsearchJson.visitMappingProperties(mapping, result::put); assertThat(result.get("type"), is("text")); assertThat(result.get("keyword"), is("keyword")); assertThat(result.get("properties"), is("long")); }