How to remove unwanted entries for a test