[fix for JENKINS-18280] Added tests