refactor async tests