Tests for __eq__ and __hash__