Use common utility functions in favor of duplicating the code in a
test-specific file.
(cherry picked from commit 5de2b07daa)
Use common utility functions in favor of duplicating the code in a
test-specific file.
(cherry picked from commit 5de2b07daa)