Improved test_event example