}
@Test
public void equality()
{
Location l1 = new LocationImpl(_resource, 22, 7);
Location l2 = new LocationImpl(_resource, 22, 7);
Location l3 = new LocationImpl(null, 22, 7);
Location l4 = new LocationImpl(_resource, 99, 7);
Location l5 = new LocationImpl(_resource, 22, 99);
Location l6 = new LocationImpl(new ClasspathResource("/baz/Biff.txt"), 22, 7);
assertEquals(l1, l1);
assertFalse(l1.equals(null));
assertEquals(l1, l2);
assertEquals(l2.hashCode(), l1.hashCode());
assertFalse(l3.equals(l1));
assertFalse(l3.hashCode() == l1.hashCode());
assertFalse(l4.equals(l1));
assertFalse(l4.hashCode() == l1.hashCode());
assertFalse(l5.equals(l1));
assertFalse(l5.hashCode() == l1.hashCode());
assertFalse(l6.equals(l1));
assertFalse(l6.hashCode() == l1.hashCode());
}