@Test
public void testHashCode() 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.hashCode() == host1.hashCode());
    Assert.assertTrue(host1.hashCode() != host2.hashCode());
    Assert.assertTrue(host1.hashCode() != host3.hashCode());
    Assert.assertTrue(host2.hashCode() == host4.hashCode());
}