add testing for asynchronous API.