event test refactoring