Use restore method on sinon object.
Use wd40.waitForMatchingURL.