Fix the tests and checkstyle