Update finish code for the test