Make tests work with async calls.