### Question:
QueryParser { public Query parse(final String query) throws JsonException, NoSuchElementException { if ( query == null ) { throw new NullPointerException("null query"); } return query.isEmpty() ? items(shape) : query.startsWith("%7B") ? json(decode(query)) : query.startsWith("{") ? json(query) : form(query); } QueryParser(final String base, final Shape shape, final Format<?> format); Query parse(final String query);  }### Answer:
@Test void testRejectMalformedPaths() { Assertions.assertThatThrownBy(() -> parse("{ '_order': '---' }", and())) .isInstanceOf(RuntimeException.class); }