public virtual void test_methods()
        {
            CapitalIndexedBondPaymentPeriod test = CapitalIndexedBondPaymentPeriod.builder().currency(USD).notional(NOTIONAL).detachmentDate(DETACHMENT).startDate(START).endDate(END).unadjustedStartDate(START_UNADJ).unadjustedEndDate(END_UNADJ).rateComputation(COMPUTE_INTERP).realCoupon(REAL_COUPON).build();

            assertEquals(test.PaymentDate, END);
            assertEquals(test.adjustPaymentDate(TemporalAdjusters.ofDateAdjuster(d => d.plusDays(2))), test);
            ImmutableSet.Builder <Index> builder = ImmutableSet.builder();
            test.collectIndices(builder);
            ImmutableSet <Index> set = builder.build();

            assertEquals(set.size(), 1);
            assertEquals(set.asList().get(0), US_CPI_U);

            LocalDate bondStart      = LocalDate.of(2003, 1, 13);
            LocalDate bondStartUnadj = LocalDate.of(2003, 1, 12);
            CapitalIndexedBondPaymentPeriod expected = CapitalIndexedBondPaymentPeriod.builder().currency(USD).notional(NOTIONAL).detachmentDate(END).startDate(bondStart).endDate(END).unadjustedStartDate(bondStartUnadj).unadjustedEndDate(END_UNADJ).rateComputation(COMPUTE_INTERP).realCoupon(1d).build();

            assertEquals(test.withUnitCoupon(bondStart, bondStartUnadj), expected);
        }