[bugfix] pass by name 'when' parameter to expectEventPersisted