support for whenEvent() clauses in tests