@Test
public void testParialIntersection() {

    List<Point2D<Integer>> bounds = new ArrayList<>();
    bounds.add(new Point2D<>(0, 0));
    bounds.add(new Point2D<>(15, 0));
    bounds.add(new Point2D<>(10, 10));
    bounds.add(new Point2D<>(0, 10));
    AreaMeasurement am = new AreaMeasurement(bounds);
    ILink link = am.toLink();
    Optional<ILink> result = fn.apply(link);
    // The trimmed coordinates should match myBounds
    ILink link0 = result.get();
    AreaMeasurement am0 = AreaMeasurement.fromLink(link0);
    List<Point2D<Integer>> bounds0 = am0.getCoordinates();
    assertTrue(bounds0.size() == myBounds.size());
    bounds0.stream()
            .forEach(p -> assertTrue(myBounds.contains(p)));
}