final double spot = 100.0;
final YieldAndDiscountCurve riskFreeCurve = YieldCurve.from(ConstantDoublesCurve.from(0.0));
final double[] tau = new double[] {0.25, 0.5, 0.75, 1, 2, 3, 4};
final double[] alpha = new double[] {0.23, 0.24, 0.25, 0.26, 0, 0, 0};
final double[] beta = new double[] {0, 0, 0, 0, 0.15, 0.2, 0.3};
final AffineDividends dividends = new AffineDividends(tau, alpha, beta);
final ForwardCurveAffineDividends curve1 = new ForwardCurveAffineDividends(spot, riskFreeCurve, dividends);
final ForwardCurveAffineDividends curve2 = cycleObject(ForwardCurveAffineDividends.class, curve1);
assertEquals(curve1.getSpot(), curve2.getSpot(), EPS);
assertTrue(curve2.getForwardCurve() instanceof FunctionalDoublesCurve);
assertTrue(curve2.getDriftCurve() instanceof FunctionalDoublesCurve);