[misc] Remove useless test

(cherry picked from commit 185df6305056e34ae0dcdf3e9325bb603cde86b5)
[misc] Add test

(cherry picked from commit 90333c3aa79ee9d79177b16d9ac11ef228f6ec00)