Refactor selection tests