Make sure callback is always called asynchronously in tests.