### Question:
EnrichPolygonalChainUtil { public static List<Point2d> enrichOpenPolygonalChainByLineCrossing(List<Point2d> openPolygonalChain, LinePoints2d splittingLine) { return enrichPolygonalChainByLineCrossing(openPolygonalChain, splittingLine, EPSILON, true); }  static List<Point2d> enrichOpenPolygonalChainByLineCrossing(List<Point2d> openPolygonalChain,
            LinePoints2d splittingLine); static List<Point2d> enrichClosedPolygonalChainByLineCrossing(List<Point2d> openPolygonalChain,
            LinePoints2d splittingLine); static List<Point2d> enrichPolygonalChainByLineCrossing(List<Point2d> closedPolygonalChain,
            LinePoints2d splittingLine, double epsilon, boolean open);  }### Answer:
@Test public void enrichOpenPolygonalChainByLineCrossing1() { Point2d p0 = debugPoint(0, 0, -1); Point2d p1 = debugPoint(1, 0, 1); Point2d s0 = debugPoint("s1", 0, 0); List<Point2d> openPolygonalChain = Arrays.asList(p0, p1); LinePoints2d splittingLine = new LinePoints2d(debugPoint("l1", 0, 0), debugPoint("l2", 1, 0)); List<Point2d> enrichedChain = EnrichPolygonalChainUtil.enrichOpenPolygonalChainByLineCrossing( openPolygonalChain, splittingLine); assertEquals(3, enrichedChain.size()); assertEquals(p0, enrichedChain.get(0)); assertEquals(s0, enrichedChain.get(1)); assertEquals(p1, enrichedChain.get(2)); }
@Test public void enrichOpenPolygonalChainByLineCrossing2() { Point2d p0 = debugPoint(0, 0, -1); Point2d p1 = debugPoint(1, 0, 0); Point2d p2 = debugPoint(2, 0, 1); List<Point2d> openPolygonalChain = Arrays.asList(p0, p1, p2); LinePoints2d splittingLine = new LinePoints2d(debugPoint("l1", 0, 0), debugPoint("l2", 1, 0)); List<Point2d> enrichedChain = EnrichPolygonalChainUtil.enrichOpenPolygonalChainByLineCrossing( openPolygonalChain, splittingLine); assertEquals(3, enrichedChain.size()); assertEquals(p0, enrichedChain.get(0)); assertEquals(p1, enrichedChain.get(1)); assertEquals(p2, enrichedChain.get(2)); }