Make tests portable.
Merge remote-tracking branch 'origin/portable_java_tests'