add tests for `preventedFn` and `stoppedFn`