Fix unused variable warnings in tests.