@Test
public void testCompleteIntersection() {

    // Test complete overlap
    List<Point2D<Integer>> bounds = new ArrayList<>();
    bounds.add(new Point2D<>(1, 1));
    bounds.add(new Point2D<>(9, 1));
    bounds.add(new Point2D<>(9, 9));
    bounds.add(new Point2D<>(1, 9));
    AreaMeasurement am = new AreaMeasurement(bounds);
    ILink link = am.toLink();
    Optional<ILink> result = fn.apply(link);
    // We expect a result
    assertTrue(result.isPresent());
    // The coordinates of the areameasurement should be unchanged.
    // Note that the order may be different
    ILink link0 = result.get();
    AreaMeasurement am0 = AreaMeasurement.fromLink(link0);
    List<Point2D<Integer>> bounds0 = am0.getCoordinates();
    assertTrue(bounds0.size() == bounds.size());
    bounds0.stream()
            .forEach(p -> assertTrue(bounds.contains(p)));
}