Added event code tests