add tests for resource events