Assert the function returns expected string.