DefaultGraphEventPersistManager implements GraphEventPersistManager { @Override public <T> void firePostEntity(T entity) { entityPostPersitEvent.fire(EntityPostPersit.of(entity)); }  @Override void firePreGraph(Vertex entity); @Override void firePostGraph(Vertex entity); @Override void firePreEntity(T entity); @Override void firePostEntity(T entity); @Override void firePreGraphEntity(T entity); @Override void firePostGraphEntity(T entity);  }
@Test public void shouldFirePostEntity() { Jedi jedi = new Jedi(); jedi.name = "Luke"; subject.firePostEntity(jedi); ArgumentCaptor<EntityPostPersit> captor = ArgumentCaptor.forClass(EntityPostPersit.class); verify(entityPostPersitEvent).fire(captor.capture()); EntityPostPersit value = captor.getValue(); assertEquals(jedi, value.getValue()); }