### Question:
NotionalSchedule implements ImmutableBean, Serializable { public static NotionalSchedule of(CurrencyAmount notional) { ArgChecker.notNull(notional, "notional"); return NotionalSchedule.builder() .currency(notional.getCurrency()) .amount(ValueSchedule.of(notional.getAmount())) .build(); } private  NotionalSchedule(
      Currency currency,
      FxResetCalculation fxReset,
      ValueSchedule amount,
      boolean initialExchange,
      boolean intermediateExchange,
      boolean finalExchange); static NotionalSchedule of(CurrencyAmount notional); static NotionalSchedule of(Currency currency, double amount); static NotionalSchedule of(Currency currency, ValueSchedule amountSchedule); static NotionalSchedule.Meta meta(); static NotionalSchedule.Builder builder(); @Override NotionalSchedule.Meta metaBean(); Currency getCurrency(); Optional<FxResetCalculation> getFxReset(); ValueSchedule getAmount(); boolean isInitialExchange(); boolean isIntermediateExchange(); boolean isFinalExchange(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_null() { assertThatIllegalArgumentException() .isThrownBy(() -> NotionalSchedule.of(null)); assertThatIllegalArgumentException() .isThrownBy(() -> NotionalSchedule.of(null, 1000d)); assertThatIllegalArgumentException() .isThrownBy(() -> NotionalSchedule.of(GBP, null)); assertThatIllegalArgumentException() .isThrownBy(() -> NotionalSchedule.of(null, ValueSchedule.of(1000d))); assertThatIllegalArgumentException() .isThrownBy(() -> NotionalSchedule.of(null, null)); }
@Test public void test_serialization() { NotionalSchedule test = NotionalSchedule.of(GBP, 1000d); assertSerialization(test); }