sandbox.stub(ImageImport, "fromFile", (fileName, source) => {
        const batch = imageImportFromFile.call(ImageImport, fileName,
            source);
        if (!batch.save.restore) {
            sandbox.stub(batch, "save", (callback) => batch.validate((err) => {