Core: Add new testing method `waitForResultWithin:`