Test equals and to string.