@Test
public void interpolate_threeElementSeriesAndThreePointsPerSegment_producesFivePoints() {

    final XYSeries series = new SimpleXYSeries(SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "test", 1, 2, 3);
    final CatmullRomInterpolator.Params params =
            new CatmullRomInterpolator.Params(3, CatmullRomInterpolator.Type.Centripetal);
    final List<XYCoords> interpolated = new CatmullRomInterpolator().interpolate(series, params);
    assertEquals(5, interpolated.size());
    // control points should exactly match input:
    assertEquals(1, interpolated.get(0).y);
    assertEquals(2, interpolated.get(2).y);
    assertEquals(3, interpolated.get(4).y);
}