Remove unnecessary code from unit test.