### Question:
CmsLeg implements Resolvable<ResolvedCmsLeg>, ImmutableBean, Serializable { public static CmsLeg.Builder builder() { return new CmsLeg.Builder(); } @ImmutableConstructor private  CmsLeg(
      PayReceive payReceive,
      PeriodicSchedule paymentSchedule,
      DaysAdjustment paymentDateOffset,
      Currency currency,
      ValueSchedule notional,
      SwapIndex index,
      FixingRelativeTo fixingRelativeTo,
      DaysAdjustment fixingDateOffset,
      DayCount dayCount,
      ValueSchedule capSchedule,
      ValueSchedule floorSchedule); AdjustableDate getStartDate(); AdjustableDate getEndDate(); IborIndex getUnderlyingIndex(); @Override ResolvedCmsLeg resolve(ReferenceData refData); static CmsLeg.Meta meta(); static CmsLeg.Builder builder(); @Override CmsLeg.Meta metaBean(); PayReceive getPayReceive(); PeriodicSchedule getPaymentSchedule(); DaysAdjustment getPaymentDateOffset(); Currency getCurrency(); ValueSchedule getNotional(); SwapIndex getIndex(); FixingRelativeTo getFixingRelativeTo(); DaysAdjustment getFixingDateOffset(); DayCount getDayCount(); Optional<ValueSchedule> getCapSchedule(); Optional<ValueSchedule> getFloorSchedule(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_builder_fail() { assertThatIllegalArgumentException() .isThrownBy(() -> CmsLeg.builder() .capSchedule(CAP) .notional(NOTIONAL) .payReceive(RECEIVE) .paymentSchedule(SCHEDULE_EUR) .build()); assertThatIllegalArgumentException() .isThrownBy(() -> CmsLeg.builder() .capSchedule(CAP) .floorSchedule(FLOOR) .index(INDEX) .notional(NOTIONAL) .payReceive(RECEIVE) .paymentSchedule(SCHEDULE_EUR) .build()); assertThatIllegalArgumentException() .isThrownBy(() -> CmsLeg .builder() .index(INDEX) .notional(NOTIONAL) .payReceive(RECEIVE) .paymentSchedule( PeriodicSchedule.of(START, END, FREQUENCY, BUSS_ADJ_EUR, StubConvention.SHORT_INITIAL, RollConventions.NONE)) .build()); }