     }
 
     func testDeleteFirstTab() {
-        let profile = TabManagerMockProfile()
-        let manager = TabManager(profile: profile, imageStore: nil)
-        let delegate = MockTabManagerDelegate()
 
         //create the tab before adding the mock delegate. So we don't have to check delegate calls we dont care about
         (0..<10).forEach {_ in manager.addTab() }

            XCTAssertTrue(previous == privateTab)
            XCTAssertTrue(next == tab)
            XCTAssertTrue(previous.isPrivate)
            XCTAssertTrue(manager.selectedTab == next)
        }
        delegate.expect([willRemove, didRemove, didSelect])
        manager.removeTabAndUpdateSelectedIndex(privateTab)

    }

    func testDidDeleteLastTab() {
        let didSelect = MethodSpy(functionName: spyDidSelectedTabChange) { tabs in
            XCTAssertNotNil(tabs[0])
            XCTAssertNotNil(tabs[1])
