Add test for event code