Implement and test equal.