Remove uses of deprecated String functions from tests.