fix test code