repair test code