wrote a test for filterLifeEvents