Update tests to work with async APIs