Cash implements InstrumentDerivative { @Deprecated public String getYieldCurveName() { if (_discountingCurveName == null) { throw new IllegalStateException("Discounting curve name was not set"); } return _discountingCurveName; } @Deprecated  Cash(final Currency currency, final double startTime, final double endTime, final double notional, final double rate, final double accrualFactor, final String yieldCurveName);  Cash(final Currency currency, final double startTime, final double endTime, final double notional, final double rate, final double accrualFactor); @Deprecated  Cash(final Currency currency, final double startTime, final double endTime, final double notional, final double initialAmount, final double rate, final double accrualFactor,
      final String yieldCurveName);  Cash(final Currency currency, final double startTime, final double endTime, final double notional, final double initialAmount, final double rate, final double accrualFactor); Currency getCurrency(); @Deprecated String getYieldCurveName(); double getStartTime(); double getEndTime(); double getAccrualFactor(); double getRate(); double getNotional(); double getInterestAmount(); double getInitialAmount(); @Override T accept(final InstrumentDerivativeVisitor<S, T> visitor, final S data); @Override T accept(final InstrumentDerivativeVisitor<?, T> visitor); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@SuppressWarnings("deprecation") @Test(expectedExceptions = IllegalStateException.class) public void testGetName() { new Cash(CCY, T - 1, T, NOTIONAL, R, FRACTION).getYieldCurveName(); }