refactoring event tests