Fixed pmd violations in CharacterTest