NormalSwaptionExpiryTenorProvider implements NormalSwaptionProviderInterface, SwaptionSurfaceProvider { @Override public double getVolatility(double expiry, double tenor, double strikeRate, double forwardRate) { return _parameters.getZValue(expiry, tenor); } NormalSwaptionExpiryTenorProvider(final MulticurveProviderInterface multicurve, 
      final Surface<Double, Double, Double> parameters, final GeneratorSwapFixedIbor generator); @Override NormalSwaptionExpiryTenorProvider copy(); @Override MulticurveProviderInterface getMulticurveProvider(); @Override double getVolatility(double expiry, double tenor, double strikeRate, double forwardRate); @Override GeneratorSwapFixedIbor getGeneratorSwap(); @Override double[] parameterSensitivity(final String name, final List<DoublesPair> pointSensitivity); @Override double[] parameterForwardSensitivity(final String name, final List<ForwardSensitivity> pointSensitivity); @Override Set<String> getAllCurveNames(); @Override Surface<Double, Double, Double> getParameterSurface();  }
@Test public void volatility() { double expiry = 1.234; double tenor = 7.0; double volatilityExpected = NORMAL_SURFACE.getZValue(expiry, tenor); double volatilityComputed = MULTICURVE_BACHELIER_SWAPTION.getVolatility(expiry, tenor, 0.0, 0.0); double volatilityComputed2 = MULTICURVE_BACHELIER_SWAPTION.getVolatility(expiry, tenor, 0.10, -0.10); assertEquals("NormalSwaptionExpiryTenorProvider: volatility", volatilityExpected, volatilityComputed, TOLERANCE_VOL); assertEquals("NormalSwaptionExpiryTenorProvider: volatility", volatilityExpected, volatilityComputed2, TOLERANCE_VOL); }