Doing assert from java?