DefaultDocumentEventPersistManager implements DocumentEventPersistManager { @Override public void firePostDocument(DocumentEntity entity) { documentEntityPostPersistEvent.fire(DocumentEntityPostPersist.of(entity)); }  @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 shouldFirePostDocument() { DocumentEntity entity = DocumentEntity.of("collection"); subject.firePostDocument(entity); ArgumentCaptor<DocumentEntityPostPersist> captor = ArgumentCaptor.forClass(DocumentEntityPostPersist.class); verify(documentEntityPostPersistEvent).fire(captor.capture()); DocumentEntityPostPersist captorValue = captor.getValue(); assertEquals(entity, captorValue.getEntity()); }