### Question:
CashFlow implements FxConvertible<CashFlow>, Comparable<CashFlow>, ImmutableBean, Serializable { public static CashFlow ofForecastValue(LocalDate paymentDate, CurrencyAmount forecastValue, double discountFactor) { return new CashFlow(paymentDate, forecastValue.multipliedBy(discountFactor), forecastValue, discountFactor); } private  CashFlow(
      LocalDate paymentDate,
      CurrencyAmount presentValue,
      CurrencyAmount forecastValue,
      double discountFactor); static CashFlow ofPresentValue(LocalDate paymentDate, CurrencyAmount presentValue, double discountFactor); static CashFlow ofPresentValue(LocalDate paymentDate, Currency currency, double presentValue, double discountFactor); static CashFlow ofForecastValue(LocalDate paymentDate, CurrencyAmount forecastValue, double discountFactor); static CashFlow ofForecastValue(LocalDate paymentDate, Currency currency, double forecastValue, double discountFactor); @Override CashFlow convertedTo(Currency resultCurrency, FxRateProvider rateProvider); @Override int compareTo(CashFlow other); static CashFlow.Meta meta(); @Override CashFlow.Meta metaBean(); LocalDate getPaymentDate(); CurrencyAmount getPresentValue(); CurrencyAmount getForecastValue(); double getDiscountFactor(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void coverage() { CashFlow test1 = CashFlow.ofForecastValue(PAYMENT_DATE, USD, FORECAST_VALUE, DISCOUNT_FACTOR); coverImmutableBean(test1); CashFlow test2 = CashFlow.ofForecastValue(LocalDate.of(2015, 7, 11), GBP, 0.24, 0.987); coverBeanEquals(test1, test2); }
@Test public void test_serialization() { CashFlow test = CashFlow.ofForecastValue(PAYMENT_DATE, USD, FORECAST_VALUE, DISCOUNT_FACTOR); assertSerialization(test); }