DefaultKeyValueEventPersistManager implements KeyValueEventPersistManager { @Override public <T> void firePreKeyValueEntity(T entity) { entityKeyValuePrePersist.fire(EntityKeyValuePrePersist.of(entity)); }  @Override void firePreKeyValue(KeyValueEntity<?> entity); @Override void firePostKeyValue(KeyValueEntity<?> entity); @Override void firePreEntity(T entity); @Override void firePostEntity(T entity); @Override void firePreKeyValueEntity(T entity); @Override void firePostKeyValueEntity(T entity);  }
@Test public void shouldFirePreKeyValueEntity() { Actor actor = new Actor(); actor.name = "Luke"; subject.firePreKeyValueEntity(actor); ArgumentCaptor<EntityKeyValuePrePersist> captor = ArgumentCaptor.forClass(EntityKeyValuePrePersist.class); verify(entityKeyValuePrePersist).fire(captor.capture()); EntityKeyValuePrePersist value = captor.getValue(); assertEquals(actor, value.getValue()); }