Removing redundant test code