### Question:
JsonThingQuery implements ThingQuery { @Override public List<Thing> filter(Collection<Thing> things) throws ThingQueryException { return getSparqlQuery().filter(things); } JsonThingQuery(String query);   JsonThingQuery(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override List<Thing> filter(Collection<Thing> things); String getQuery();  }### Answer:
@Test public void filterShouldReturnOnlyMatchingThings() throws ThingQueryException { List<Thing> things = new ArrayList<>(); things.add(new Thing.Builder() .setObjectContext(new Context("https: .setObjectType("Thing") .setId("KlimabotschafterWetterstationen:Stellingen") .build()); for (int i = 0; i < 10; i++) { things.add(new Thing.Builder() .setObjectContext(new Context("https: .setId("luftdaten.info:" + i) .build()); } ThingQuery query = new JsonThingQuery("{\"@type\":\"https: Collection<Thing> filtered = query.filter(things); assertEquals(1, filtered.size()); }