PMD and Unit test fixes.