### Question:
Selectors { public static Map<String, Long> longPropertiesAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyMap(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a key-value list"); } Map<String, Long> longProperties = new LinkedHashMap<>(); for (JsonNode listElement : node) { Iterator<Map.Entry<String, JsonNode>> fields = listElement.fields(); if (!fields.hasNext()) { throw new WrongTypeException(pointer, "not a key-value list"); } Map.Entry<String, JsonNode> field = fields.next(); if (!field.getValue().isLong() && !field.getValue().isInt()) { throw new WrongTypeException( pointer, "value for key-value pair at " + field.getKey() + " is not a long: " + field.getValue()); } longProperties.put(field.getKey(), field.getValue().asLong()); } return longProperties; }  static String textAt(JsonNode node, JsonPointer pointer); static Optional<String> optionalTextAt(JsonNode node, JsonPointer pointer); static int integerAt(JsonNode node, JsonPointer pointer); static long longAt(JsonNode node, JsonPointer pointer); static OptionalInt optionalIntegerAt(JsonNode node, JsonPointer pointer); static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer); static List<String> textListAt(JsonNode node, JsonPointer pointer); static Map<String, String> propertiesAt(JsonNode node, JsonPointer pointer); static Map<String, Long> longPropertiesAt(JsonNode node, JsonPointer pointer);  }### Answer:
@Test public void longPropertiesAt() { ObjectNode node = newObject(); node.putArray("foo").add(newKvObject("k1", 91L)).add(newKvObject("k2", 1108L)); Map<String, Long> value = Selectors.longPropertiesAt(node, FOO_FIELD); assertThat(value, allOf(hasEntry("k1", 91L), hasEntry("k2", 1108L))); }