Fix test related to Sonar issue