 
 import XCTest
 @testable import Rocket_Chat
+
+extension DatabaseManager {
+    static func setupTestServers() {
+        let servers = [[
+            ServerPersistKeys.databaseName: "foo.realm",
+            ServerPersistKeys.serverURL: "wss://foo.com/websocket",
+            ServerPersistKeys.token: "1",
+            ServerPersistKeys.userId: "1"
+        ], [
+            ServerPersistKeys.databaseName: "open.realm",
+            ServerPersistKeys.serverURL: "wss://open.rocket.chat/websocket",
+            ServerPersistKeys.token: "1",
+            ServerPersistKeys.userId: "1"
+        ]]
+
+        UserDefaults.standard.set(servers, forKey: ServerPersistKeys.servers)
+    }
+}
 
 class DatabaseManagerSpec: XCTestCase {
 

        XCTAssertNotNil(server?[ServerPersistKeys.databaseName], "new server database name isn't nil")
    }

}

    }

    func testServersList() {
        DatabaseManager.setupTestServers()
        XCTAssertEqual(DatabaseManager.servers?.count, 2, "2 servers into the list")
    }

    func testSelectDatabase() {
