Abstracted aysnc wait function in tests
TODOs