Add unit tests for ActivityHandler