Fix a test that was not waiting for the future to complete before verifying mock