More JNI test code (incomplete).