tests for event api
fix part of the tests