Remove unused code from tests.