Remove duplication in EventTest

Thanks to Scrutinizer a duplication in test was found and this commit
aims to fix it, creating a private method to create an event with name
'test' and one listener attached.