Writing test code for transform function