Updated gradient test.