### Question:
OvernightCompoundedAnnualRateComputation implements OvernightRateComputation, ImmutableBean, Serializable { public static OvernightCompoundedAnnualRateComputation of( OvernightIndex index, LocalDate startDate, LocalDate endDate, ReferenceData refData) { return OvernightCompoundedAnnualRateComputation.builder() .index(index) .fixingCalendar(index.getFixingCalendar().resolve(refData)) .startDate(index.calculateFixingFromEffective(startDate, refData)) .endDate(index.calculateFixingFromEffective(endDate, refData)) .build(); } private  OvernightCompoundedAnnualRateComputation(
      OvernightIndex index,
      HolidayCalendar fixingCalendar,
      LocalDate startDate,
      LocalDate endDate); static OvernightCompoundedAnnualRateComputation of(
      OvernightIndex index,
      LocalDate startDate,
      LocalDate endDate,
      ReferenceData refData); static OvernightCompoundedAnnualRateComputation.Meta meta(); static OvernightCompoundedAnnualRateComputation.Builder builder(); @Override OvernightCompoundedAnnualRateComputation.Meta metaBean(); @Override OvernightIndex getIndex(); @Override HolidayCalendar getFixingCalendar(); @Override LocalDate getStartDate(); @Override LocalDate getEndDate(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_badDateOrder() { assertThatIllegalArgumentException() .isThrownBy(() -> OvernightCompoundedAnnualRateComputation.of( BRL_CDI, date(2016, 2, 24), date(2016, 2, 24), REF_DATA)); assertThatIllegalArgumentException() .isThrownBy(() -> OvernightCompoundedAnnualRateComputation.of( BRL_CDI, date(2016, 2, 25), date(2016, 2, 24), REF_DATA)); }
@Test public void test_observeOn() { OvernightCompoundedAnnualRateComputation test = sut(); assertThat(test.observeOn(date(2016, 2, 24))).isEqualTo(OvernightIndexObservation.of(BRL_CDI, date(2016, 2, 24), REF_DATA)); }