Testing JNI implementation