Refactor post test