                     
                     //set ourselves as delegate
                     ServiceLocator.setDelegate(delegate: self)
-                    let authenticationService = ServiceLocator.service(forType: TwitterAuthenticationService.self)
-                    authenticationService?.stubbed = [logoutStubAuthenticated]
+                    let authenticationService = ServiceLocator.service(forType: TwitterAuthenticationService.self, stubs: [logoutStubAuthenticated])
                     authenticationService?.logoutTwitterClient(completion: { loggedOut in
                         expect(loggedOut).to(beFalse())
                         expect(self.delegateGot401).to(beTrue())

                
                it("should be authenticated") {
                    
                    let authenticationService = ServiceLocator.service(forType: TwitterAuthenticationService.self)
                    authenticationService?.stubbed = [authStub]
                    authenticationService?.authenticateTwitterClient(completion: { authenticated in
                        expect(authenticated).to(beTrue())
                    })

        let logoutStubUnauthenticated = ServiceStub(execute: ServiceStubRequest(path: "/oauth2/invalidate_token"),
                                                    with: .failure(code:401, response:[:]), when: .unauthenticated)
        let logoutStubAuthenticated = ServiceStub(execute: ServiceStubRequest(path: "/oauth2/invalidate_token"),
                                                  with: .failure(code:401, response:[:]),
                                                  when: .authenticated(tokenInfo: ["token_type" : "access", "access_token" : "KWALI"]))
        
        beforeEach {
            ServiceLocator.defaultNetworkClientType = StubNetworkManager.self            
