Add equals methods to the value objects

Also add some tests.

Change-Id: Icbedfd3c65a772e4e63581dc9c1c6f198b886f08