add test for #2789 testcase 2