AC-14: Updated gradle configuration with tests build.
Fixed PMD and Checkstyle errors.