### Question:
QueryParser { private List<?> stats(final JsonObject query) { return Optional.ofNullable(query.get("_stats")) .filter(v -> !v.equals(JsonValue.NULL)) .map(v -> v instanceof JsonString ? (JsonString)v : error("_stats is not a string")) .map(path -> path(path.getString(), shape)) .orElse(null); } QueryParser(final String base, final Shape shape, final Format<?> format); Query parse(final String query);  }### Answer:
@Test void testParsePaths() { stats("{ '_stats': '' }", shape, stats -> assertThat(stats.getPath()) .as("empty path") .isEmpty() ); stats("{ '_stats': 'head' }", shape, stats -> assertThat(stats.getPath()) .as("direct naked step") .containsExactly("head") ); stats("{ '_stats': 'head.tail' }", shape, stats -> assertThat(stats.getPath()) .as("naked dot path") .containsExactly("head", "tail") ); stats("{ '_stats': 'head.tail' }", shape, stats -> assertThat(stats.getPath()) .as("naked dot path") .containsExactly("head", "tail") ); }