     import Cocoa
 #endif
 
-internal final class ConnectionObserver {
+protocol ConnectionObserver {
+    func setUp(onConnect: @escaping () -> (), onDisconnect: @escaping () -> ())
+}
+
+internal final class ConnectionObserverImpl: ConnectionObserver {
     
-    private let defaultCenter: VKNotificationCenter?
-    private let workspaceCenter: VKNotificationCenter?
+    private let appStateCenter: VKNotificationCenter
+    private let reachabilityCenter: VKNotificationCenter
     private let reachability: VKReachability
+    
+    private let activeNotificationName: Notification.Name
+    private let inactiveNotificationName: Notification.Name
+    private let reachabilityNotificationName: Notification.Name
     
     private var appIsActive = true
     private var onConnect: (() -> ())?

    
    private func setUpReachabilityObserver() {
        
        let reachabilityObserver = defaultCenter?.addObserver(
            forName: ReachabilityChangedNotification,
            object: self,
            queue: nil,

            }
        )
        
        let resignActiveObserver = appStateCenter.addObserver(
            forName: inactiveNotificationName,
            object: self,
            queue: nil,
            using: { [weak self] notification in
