Test onPrePersist and onPreUpdate event listeners.