Refactor table ready test