Add isEqualTo method and tests