Fix code coverage problems with sonar.