[Java] Fix broken tests
[Java] Improve comments