DoubleBarrierOptionFunctionProvider extends BarrierOptionFunctionProvider { public double getUpperBarrier() { return _upperBarrier; } DoubleBarrierOptionFunctionProvider(final double strike, final double timeToExpiry, final int steps, final boolean isCall, final double lowerBarrier, final double upperBarrier,
      final BarrierTypes typeName); @Override double[] getPayoffAtExpiry(final double assetPrice, final double downFactor, final double upOverDown); @Override double[] getNextOptionValues(final double discount, final double upProbability, final double downProbability, final double[] values, final double baseAssetPrice, final double sumCashDiv,
      final double downFactor, final double upOverDown, final int steps); @Override double[] getPayoffAtExpiryTrinomial(final double assetPrice, final double downFactor, final double middleOverDown); @Override double[] getNextOptionValues(final double discount, final double upProbability, final double middleProbability, final double downProbability, final double[] values,
      final double baseAssetPrice, final double sumCashDiv, final double downFactor, final double middleOverDown, final int steps); @Override CrossBarrierChecker getChecker(); BarrierTypes getBarrierType(); double getLowerBarrier(); double getUpperBarrier(); @Override double getBarrier(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void getUpperBarrierTest() { final OptionFunctionProvider1D function = new DoubleBarrierOptionFunctionProvider(100., TIME, 21, true, 88., 121., DoubleBarrierOptionFunctionProvider.BarrierTypes.valueOf("DoubleKnockOut")); assertEquals(((DoubleBarrierOptionFunctionProvider) function).getUpperBarrier(), 121.); }