Please add a case to the Java API tests, too (I merged that already, you should see the file in master and 2.2)