[JENKINS-19108] added a test case to verify the fix.