comprehensive testing for integrate function added. tests for grad will be added in the next check in. GradTest is obsolete now.