Support query arguments from Java and cleanup Java interop tests.