Fix test code