Refactor the tests for event relations.