Add test coverage for addHandler()