added tests + checkstyle