Test script refactored for list tests