Improve test
(cherry picked from commit f1963084193cfe30055bf6e91178d4d2b3117148)