### Question:
SabrHaganVolatilityFunctionProvider extends VolatilityFunctionProvider<SabrFormulaData> implements SabrVolatilityFormula, ImmutableBean, Serializable { @Override public double volatility(double forward, double strike, double timeToExpiry, SabrFormulaData data) { ArgChecker.notNull(data, "data"); double alpha = data.getAlpha(); double beta = data.getBeta(); double rho = data.getRho(); double nu = data.getNu(); return volatility(forward, strike, timeToExpiry, alpha, beta, rho, nu); } private  SabrHaganVolatilityFunctionProvider(); @Override double volatility(double forward, double strike, double timeToExpiry, SabrFormulaData data); @Override double volatility(
      double forward,
      double strike,
      double timeToExpiry,
      double alpha,
      double beta,
      double rho,
      double nu); @Override ValueDerivatives volatilityAdjoint(double forward, double strike, double timeToExpiry, SabrFormulaData data); @Override ValueDerivatives volatilityAdjoint(
      double forward,
      double strike,
      double timeToExpiry,
      double alpha,
      double beta,
      double rho,
      double nu); @Override double volatilityAdjoint2(
      double forward,
      double strike,
      double timeToExpiry,
      SabrFormulaData data,
      double[] volatilityD,
      double[][] volatilityD2); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static TypedMetaBean<SabrHaganVolatilityFunctionProvider> meta(); @Override TypedMetaBean<SabrHaganVolatilityFunctionProvider> metaBean(); static final SabrHaganVolatilityFunctionProvider DEFAULT; }### Answer:
@Test public void testATMSmoothness() { double timeToExpiry = 1; double alpha = 0.05; double beta = 0.5; double nu = 0.50; double rho = -0.25; int nbPoints = 100; double forward = 0.05; double[] sabrVolatilty = new double[2 * nbPoints + 1]; double range = 5E-9; double[] strike = new double[2 * nbPoints + 1]; for (int looppts = -nbPoints; looppts <= nbPoints; looppts++) { strike[looppts + nbPoints] = forward + ((double) looppts) / nbPoints * range; SabrFormulaData sabrData = SabrFormulaData.of(alpha, beta, rho, nu); sabrVolatilty[looppts + nbPoints] = FUNCTION.volatility(forward, strike[looppts + nbPoints], timeToExpiry, sabrData); } for (int looppts = -nbPoints; looppts < nbPoints; looppts++) { assertThat(Math.abs(sabrVolatilty[looppts + nbPoints + 1] - sabrVolatilty[looppts + nbPoints]) / (strike[looppts + nbPoints + 1] - strike[looppts + nbPoints]) < 20.0).isTrue(); } }