Extract a function to make an expected string to share it with other test functions.