         let engineToRemove = manager.engines[1]
         manager.removeEngine(engine: engineToRemove)
         
-        XCTAssertEqual(mockUserDefaults.setCalls, 1)
+        XCTAssertEqual(mockUserDefaults.setCalls, 2)
         XCTAssertFalse(manager.engines.contains(where: { (engine) -> Bool in
             return engine.name == engineToRemove.name
         }))

        XCTAssertEqual(manager.activeEngine.name, CUSTOM_ENGINE_NAME)
        
        // Verify that it persisted the custom engine and updated the default engine
        XCTAssertEqual(mockUserDefaults.setCalls, 2)
    }
    
    func testRemoveDefaultEngine() {

        manager.activeEngine = manager.engines[0]
        manager.removeEngine(engine: engineAdded)
        
        XCTAssertEqual(mockUserDefaults.setCalls, 5)
        XCTAssertFalse(manager.engines.contains(where: { (engine) -> Bool in
            return engine.name == engineAdded.name
        }))
