implement tests for thrown events