Java bindings: fixes for testreverse class