test register of event