finish test code