final double factorToNextCoupon = (factorPeriod - factorSpot) / factorPeriod;
final CouponInflationDefinition nominalLast = bondFromDefinition.getNominal().getNthPayment(bondFromDefinition.getNominal().getNumberOfPayments() - 1);
final ZonedDateTime settlementDate2 = spot;
final double notional = 1.0;
final CouponInflationDefinition settlementDefinition = nominalLast.with(settlementDate2, nominalLast.getAccrualStartDate(), settlementDate2, notional);
final CouponInflation settlement = (CouponInflation) settlementDefinition.toDerivative(pricingDate);
final BondCapitalIndexedSecurity<Coupon> bondSecurityExpected = new BondCapitalIndexedSecurity<>(nominal, coupon, settleTime, accruedInterest,
factorToNextCoupon, YIELD_CONVENTION_GILT_1, COUPON_PER_YEAR_GILT_1, settlement, INDEX_START_GILT_1, ISSUER_UK);
assertEquals("Capital Index Bond: toDerivative", bondSecurityExpected, bond);
}