QA-5438 : updated code according to review of BACKLOG-3760 , https://devtools.jahia.com/fisheye/cru/AND-176