+act #3532: Add ask support for Java API

I did not find such a test case so I contributed this. More tests might be useful though, I just don't want to forget this.