DEVSUPPORT-1173: Add automate test
DEVSUPPORT-1173: Fix the bug