Refactored async test