Updated tests to support asynchronicity