@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else if (!(obj instanceof Point)) {
            return false;
        }
        Point other = (Point) obj;
        if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(other.x)) {
            return false;
        } else if (Double.doubleToLongBits(this.y) != Double.doubleToLongBits(other.y)) {
            return false;
        }
        return true;
    }
@Test
    public void equalsTest() {
        Point point1 = new Point(1, 2);
        Point point2 = new Point(1, 2);
        Point point3 = new Point(1, 1);
        Point point4 = new Point(2, 2);

        TestUtils.equalsTest(point1, point2);

        TestUtils.notEqualsTest(point1, point3);
        TestUtils.notEqualsTest(point1, point4);
        TestUtils.notEqualsTest(point1, new Object());
        TestUtils.notEqualsTest(point1, null);
    }