unit test of event