### Question:
ArrayFilters { static ArrayFilters parse(Document query, Document updateQuery) { @SuppressWarnings("unchecked") List<Document> arrayFilters = (List<Document>) query.getOrDefault("arrayFilters", Collections.emptyList()); return parse(arrayFilters, updateQuery); } private  ArrayFilters(Map<String, Object> values); static ArrayFilters empty(); @VisibleForExternalBackends boolean isEmpty(); @Override String toString();  }### Answer:
@Test void testParse_FilterNotUsed() throws Exception { Document query = json("arrayFilters: [{x: {$gt: 20}}]"); Document updateQuery = json("$set: {'a.b': 20}"); assertThatExceptionOfType(FailedToParseException.class) .isThrownBy(() -> ArrayFilters.parse(query, updateQuery)) .withMessage("[Error 9] The array filter for identifier 'x' was not used in the update { $set: { a.b: 20 } }"); }