### Question:
OrthogonalRouteWithObstacles { public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); } OrthogonalRouteWithObstacles();  OrthogonalRouteWithObstacles(List<Rectangle> obstacles); long getBuildInitTime(); long getBuildLazyTime(); long getInitRoutingTime(); long getForbiddenSegmentsTime(); long getAdditionalLinesTime(); long getInitTime(); List<Vector> findRoute(Vector start, Vector end); void addAdditionalLines(List<Segment> additionalLines); void addForbiddenSegments(List<Segment> forbiddenSegments); void setMinDistToForbiddenSegment(int minDistToForbiddenSegment);  }### Answer:
@Test public void noObstaclesHorRoute() { Vector s = new Vector(100, 0); Vector e = new Vector(200, 0); List<Vector> r = o.findRoute(s, e); assertTrue(r.size() == 2); assertEquals(s, r.get(0)); assertEquals(e, r.get(1)); }
@Test public void noObstaclesVerRoute() { Vector s = new Vector(0, 1); Vector e = new Vector(0, 2); List<Vector> r = o.findRoute(s, e); assertTrue(r.size() == 2); assertEquals(s, r.get(0)); assertEquals(e, r.get(1)); }
@Test public void noObstaclesPolylineRoute() { Vector s = new Vector(100, 0); Vector e = new Vector(200, 200); List<Vector> r = o.findRoute(s, e); assertTrue(r.size() == 3); assertEquals(s, r.get(0)); assertEquals(new Vector(100, 200), r.get(1)); assertEquals(e, r.get(2)); }
@Test public void startEqualsEnd() { Vector s = new Vector(0, 0); Vector e = new Vector(0, 0); List<Rectangle> a = Arrays.asList(new Rectangle(1, 1, 1, 1)); List<Vector> r = o.findRoute(s, e); assertTrue(r.size() == 1); assertEquals(s, r.get(0)); }