public virtual void test_wrongMonthOrder()
 {
     assertThrowsIllegalArg(() => InflationInterpolatedRateComputation.of(GB_HICP, END_MONTH_FIRST, START_MONTH_FIRST, WEIGHT));
     assertThrowsIllegalArg(() => InflationInterpolatedRateComputation.meta().builder().set(InflationInterpolatedRateComputation.meta().startObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 1))).set(InflationInterpolatedRateComputation.meta().startSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 1))).set(InflationInterpolatedRateComputation.meta().endObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 7))).set(InflationInterpolatedRateComputation.meta().endSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 8))).set(InflationInterpolatedRateComputation.meta().weight(), WEIGHT).build());
     assertThrowsIllegalArg(() => InflationInterpolatedRateComputation.meta().builder().set(InflationInterpolatedRateComputation.meta().startObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 1))).set(InflationInterpolatedRateComputation.meta().startSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 2))).set(InflationInterpolatedRateComputation.meta().endObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 7))).set(InflationInterpolatedRateComputation.meta().endSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 7))).set(InflationInterpolatedRateComputation.meta().weight(), WEIGHT).build());
     assertThrowsIllegalArg(() => InflationInterpolatedRateComputation.meta().builder().set(InflationInterpolatedRateComputation.meta().startObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 8))).set(InflationInterpolatedRateComputation.meta().startSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 9))).set(InflationInterpolatedRateComputation.meta().endObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 7))).set(InflationInterpolatedRateComputation.meta().endSecondObservation(), PriceIndexObservation.of(GB_HICP, YearMonth.of(2010, 8))).set(InflationInterpolatedRateComputation.meta().weight(), WEIGHT).build());
 }
        //-------------------------------------------------------------------------
        public virtual void test_collectIndices()
        {
            InflationInterpolatedRateComputation test = InflationInterpolatedRateComputation.of(GB_HICP, START_MONTH_FIRST, END_MONTH_FIRST, WEIGHT);

            ImmutableSet.Builder <Index> builder = ImmutableSet.builder();
            test.collectIndices(builder);
            assertEquals(builder.build(), ImmutableSet.of(GB_HICP));
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            InflationInterpolatedRateComputation test1 = InflationInterpolatedRateComputation.of(GB_HICP, START_MONTH_FIRST, END_MONTH_FIRST, WEIGHT);

            coverImmutableBean(test1);
            InflationInterpolatedRateComputation test2 = InflationInterpolatedRateComputation.of(CH_CPI, YearMonth.of(2010, 1), YearMonth.of(2010, 7), WEIGHT + 0.1d);

            coverBeanEquals(test1, test2);
        }
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            InflationInterpolatedRateComputation test = InflationInterpolatedRateComputation.of(GB_HICP, START_MONTH_FIRST, END_MONTH_FIRST, WEIGHT);

            assertEquals(test.Index, GB_HICP);
            assertEquals(test.StartObservation.FixingMonth, START_MONTH_FIRST);
            assertEquals(test.StartSecondObservation.FixingMonth, START_MONTH_SECOND);
            assertEquals(test.EndObservation.FixingMonth, END_MONTH_FIRST);
            assertEquals(test.EndSecondObservation.FixingMonth, END_MONTH_SECOND);
            assertEquals(test.Weight, WEIGHT, 1.0e-14);
        }
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         InflationInterpolatedRateComputation other = (InflationInterpolatedRateComputation)obj;
         return(JodaBeanUtils.equal(startObservation, other.startObservation) && JodaBeanUtils.equal(startSecondObservation, other.startSecondObservation) && JodaBeanUtils.equal(endObservation, other.endObservation) && JodaBeanUtils.equal(endSecondObservation, other.endSecondObservation) && JodaBeanUtils.equal(weight, other.weight));
     }
     return(false);
 }
        public virtual void test_serialization()
        {
            InflationInterpolatedRateComputation test = InflationInterpolatedRateComputation.of(GB_HICP, START_MONTH_FIRST, END_MONTH_FIRST, WEIGHT);

            assertSerialization(test);
        }