Modified tests

Parameter validation that can happen in C++ should be done there. That's consistent with the other methods. And more efficient that calling through JNI multiple times.