@Test public void simple() { // give it a function where one variable does not effect the output // to make the test more interesting SimpleFunction f = new SimpleFunction(); NumericalGradientFB alg = new NumericalGradientFB(f); double output[] = new double[]{1,1,1}; alg.process(new double[]{2,3,7},output); assertEquals(3, output[0], tol); assertEquals(-36, output[1], tol); assertEquals(0, output[2], tol); }