reformat test code