Fix integration test for event API to have correct context