Modify test code for transform_text API