Fix for Sonar
BS-8008 : Fix random tests in error