some basic jni memory management testing with dummy data generator