VolatilityFunctionFactory { public static String getCalculatorName(final VolatilityFunctionProvider<?> calculator) { if (calculator == null) { return null; } return s_instanceNames.get(calculator.getClass()); } private  VolatilityFunctionFactory(); static VolatilityFunctionProvider<?> getCalculator(final String name); static String getCalculatorName(final VolatilityFunctionProvider<?> calculator); static final String HAGAN; static final String ALTERNATIVE_HAGAN; static final String BERESTYCKI; static final String JOHNSON; static final String PAULOT; static final SABRHaganVolatilityFunction HAGAN_FORMULA; static final SABRHaganAlternativeVolatilityFunction ALTERNATIVE_HAGAN_FORMULA; static final SABRBerestyckiVolatilityFunction BERESTYCKI_FORMULA; static final SABRJohnsonVolatilityFunction JOHNSON_FORMULA; static final SABRPaulotVolatilityFunction PAULOT_FORMULA; }
@Test public void testWrongCalculator() { assertNull(VolatilityFunctionFactory.getCalculatorName(new SVIVolatilityFunction())); }