@Test
public void testEquals() {

  Animal animal = new Animal("male", 1);
  ObjectTester.assertEqual(animal, animal, new Animal("male", 1));
  ObjectTester.assertNotEqual(animal,
      null, new Animal("male", 2), new Animal("female", 1), new Mammal("male", 1), "whatever");
  ObjectTester.assertEqual(new Mammal("female", 2), new Mammal("female", 2));
  ObjectTester.assertEqual(new Dog("male", 1, "tom"), new Dog("male", 1, "tom"));
  ObjectTester.assertNotEqual(new Dog("male", 1, "tom"), null, new Mammal("male", 1), 1);
}