@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else if (!(obj instanceof LineSegment)) {
            return false;
        }
        LineSegment other = (LineSegment) obj;
        if (other.start.equals(this.start) && other.end.equals(this.end)) {
            return true;
        }
        return false;
    }
@Test
    public void equalsTest() {
        Point point1 = new Point(1, 2);
        Point point2 = new Point(1, 2);
        Point point3 = new Point(1, 1);

        LineSegment point1ToPoint2 = new LineSegment(point1, point2);
        LineSegment point1ToPoint3 = new LineSegment(point1, point3);
        LineSegment point1ToPoint1 = new LineSegment(point1, point1);

        Assert.assertNotEquals(point1ToPoint1, point1ToPoint3);
        Assert.assertEquals(point1ToPoint1, point1ToPoint1);
        Assert.assertEquals(point1ToPoint1, point1ToPoint2);
    }