Refactor to remove JNI test
Remove of JNI