CHECKSTYLE-4: A number of checkstyle fixes

Mostly affects formatting of a number of test classes, adding missing `final` keywords and fixing end-of-line formatting issues.