 
             realm.add(auth)
 
-            XCTAssert(AuthManager.isAuthenticated()?.serverURL == auth.serverURL, "isAuthenticated returns Auth instance")
+            XCTAssert(self.authManager.isAuthenticated()?.serverURL == auth.serverURL, "isAuthenticated returns Auth instance")
         })
     }
 

extension AuthManagerSpec {

    func testIsAuthenticatedUserNotAuthenticated() {
        XCTAssert(AuthManager.isAuthenticated() == nil, "isAuthenticated returns nil for non authenticated users")
    }

    func testIsAuthenticatedUserAuthenticated() {


@testable import Rocket_Chat

class AuthManagerSpec: XCTestCase, AuthManagerInjected {

    var injectionContainer: InjectionContainer!

    override func setUp() {
        super.setUp()

        self.injectionContainer = DependencyRepository()

        // Clear all the Auth objects in Realm
        Realm.executeOnMainThread({ realm in
