Update the gradient method test case.