@Test
public void testEquals() throws Exception {

    final Host host1 = new Host("somehost", 8080);
    final Host host2 = new Host("somehost", 80);
    final Host host3 = new Host("someotherhost", 8080);
    final Host host4 = new Host("somehost", 80);
    Assert.assertTrue(host1.equals(host1));
    Assert.assertFalse(host1.equals(host2));
    Assert.assertFalse(host1.equals(host3));
    Assert.assertTrue(host2.equals(host4));
}