Remove unused code from collection test