RealFunctionIntegrator1DFactory { public static Integrator1D<Double, Double> getIntegrator(final String integratorName) { final Integrator1D<Double, Double> integrator = s_staticInstances.get(integratorName); if (integrator != null) { return integrator; } throw new IllegalArgumentException("Integrator " + integratorName + " not handled"); } private  RealFunctionIntegrator1DFactory(); static Integrator1D<Double, Double> getIntegrator(final String integratorName); static String getIntegratorName(final Integrator1D<Double, Double> integrator); static final String ROMBERG; static final RombergIntegrator1D ROMBERG_INSTANCE; static final String SIMPSON; static final SimpsonIntegrator1D SIMPSON_INSTANCE; static final String EXTENDED_TRAPEZOID; static final ExtendedTrapezoidIntegrator1D EXTENDED_TRAPEZOID_INSTANCE; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testBadName() { RealFunctionIntegrator1DFactory.getIntegrator("a"); }