### Question:
OvernightRateCalculation implements RateCalculation, ImmutableBean, Serializable { public static OvernightRateCalculation.Builder builder() { return new OvernightRateCalculation.Builder(); } private  OvernightRateCalculation(
      DayCount dayCount,
      OvernightIndex index,
      OvernightAccrualMethod accrualMethod,
      NegativeRateMethod negativeRateMethod,
      int rateCutOffDays,
      ValueSchedule gearing,
      ValueSchedule spread); static OvernightRateCalculation of(OvernightIndex index); @Override SwapLegType getType(); @Override void collectCurrencies(ImmutableSet.Builder<Currency> builder); @Override void collectIndices(ImmutableSet.Builder<Index> builder); @Override ImmutableList<RateAccrualPeriod> createAccrualPeriods(
      Schedule accrualSchedule,
      Schedule paymentSchedule,
      ReferenceData refData); static OvernightRateCalculation.Meta meta(); static OvernightRateCalculation.Builder builder(); @Override OvernightRateCalculation.Meta metaBean(); @Override DayCount getDayCount(); OvernightIndex getIndex(); OvernightAccrualMethod getAccrualMethod(); NegativeRateMethod getNegativeRateMethod(); int getRateCutOffDays(); Optional<ValueSchedule> getGearing(); Optional<ValueSchedule> getSpread(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_builder_noIndex() { assertThatIllegalArgumentException() .isThrownBy(() -> OvernightRateCalculation.builder().build()); }
@Test public void test_serialization() { OvernightRateCalculation test = OvernightRateCalculation.builder() .dayCount(ACT_365F) .index(GBP_SONIA) .build(); assertSerialization(test); }