DefaultDocumentEventPersistManager implements DocumentEventPersistManager { @Override public void firePreDeleteQuery(DocumentDeleteQuery query) { documentDeleteQueryExecute.fire(DocumentDeleteQueryExecute.of(query)); }  @Override void firePreDocument(DocumentEntity entity); @Override void firePostDocument(DocumentEntity entity); @Override void firePreEntity(T entity); @Override void firePostEntity(T entity); @Override void firePreDocumentEntity(T entity); @Override void firePostDocumentEntity(T entity); @Override void firePreQuery(DocumentQuery query); @Override void firePreDeleteQuery(DocumentDeleteQuery query);  }
@Test public void shouldFirePreDeleteQuery() { DocumentDeleteQuery query = delete().from("collection").build(); subject.firePreDeleteQuery(query); ArgumentCaptor<DocumentDeleteQueryExecute> captor = ArgumentCaptor.forClass(DocumentDeleteQueryExecute.class); verify(documentDeleteQueryExecute).fire(captor.capture()); assertEquals(query, captor.getValue().getQuery()); }