Remove unused code from test case