Removing unused code in test