@Test
public void testEquals() {

    final NicGeoPoint pointA = new NicGeoPointImpl();
    pointA.setXY(100, 200);
    assertTrue(pointA.equals(pointA));
    assertFalse(pointA.equals(null));
    assertFalse(pointA.equals("hallo!?"));
    final NicGeoPoint pointB = new NicGeoPointImpl();
    // Identical Points
    pointB.setXY(100, 200);
    assertTrue(pointA.equals(pointB));
    assertTrue(pointB.equals(pointA));
    // X is different
    pointB.setXY(101, 200);
    assertFalse(pointA.equals(pointB));
    assertFalse(pointB.equals(pointA));
    // Y is different
    pointB.setXY(100, 201);
    assertFalse(pointA.equals(pointB));
    assertFalse(pointB.equals(pointA));
    // Divergence is different.
    pointB.setXY(100, 200);
    pointB.setDivergence(1);
    assertFalse(pointA.equals(pointB));
    assertFalse(pointB.equals(pointA));
    // Identical Points
    pointA.setDivergence(1);
    assertTrue(pointA.equals(pointB));
    assertTrue(pointB.equals(pointA));
}