Fix broken test case after async API change.