### Question:
Ray2D { public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D getDirection(); void setDirection(Vector2D direction); Vector2D intersectionPoint(Ray2D other); Ray2D intersectionRay(Ray2D other); Segment2D intersectionSegment(Ray2D other); boolean contains(Vector2D point); boolean isParallel(Ray2D other); boolean equals(Ray2D other); String toString();  }### Answer:
@Test public void equals() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(1,1); bDirection = GeometryFactory.createVector(1,0); b = GeometryFactory.createRay2D(bStart, bDirection); assertFalse(a.equals(b)); bStart = GeometryFactory.createVector(0,0); bDirection = GeometryFactory.createVector(2,0); b = GeometryFactory.createRay2D(bStart, bDirection); assertTrue(a.equals(b)); }