Fixed a test and fixed checkstyle errors