Fix tests and checkstyle