Fix unnecessary variable and typo in test file.