Fixed PMD warnings and incorrect @covers statements