Java: fix test 16
Java: remove trailing whitespace
Java: add `nfc` helper
Java: apply a more standard formatting for long lines