Added full jni support for post events.
Fixed a couple of small test issues.