         return (try? NSJSONSerialization.JSONObjectWithData(data, options: [])) as?
             [String : AnyObject]
     }
-
+    
     // MARK: Tests
-
+    
     private func validateAdvertisingUpdate(jsonString: String, advertising: Bool, browsing: Bool) {
         let json = jsonDictionaryFrom(jsonString)
         let listeningActive = (json?[JSONKey.discoveryActive.rawValue] as? Bool)

        }
        XCTAssertEqual(contextError, .badParameters)
    }

    func testGetIOSVersion() {
        XCTAssertEqual(NSProcessInfo().operatingSystemVersionString, context.getIOSVersion())
    }

    func testThaliCoreErrors() {
        // testing parameters count
        var error: AppContextError?
        do {
            try context.multiConnectToPeer([""])
        } catch let err as AppContextError {
            error = err
        } catch _ {}
        XCTAssertEqual(error, AppContextError.badParameters)

        // testing parameter types
        error = nil
        do {
            try context.multiConnectToPeer([2, 2])
        } catch let err as AppContextError {
            error = err
        } catch _ {}
        XCTAssertEqual(error, AppContextError.badParameters)
    }

    func testMultiConnect() {
        // todo will be implemented as soon as we will have the whole stack working #881
    }

    func testErrorDescription() {
        XCTAssertEqual(ThaliCoreError.IllegalPeerID.rawValue,
                       errorDescription(ThaliCoreError.IllegalPeerID))

        let unknownError = AppContextError.unknownError
        XCTAssertEqual((unknownError as NSError).localizedDescription,
                       errorDescription(unknownError))
    }

    func testJsonValue() {
        var jsonDict: [String : AnyObject] = ["number" : 4.2]
        var jsonString = "{\"number\":4.2}"

        }
    }
    @objc func context(context: AppContext, didUpdateDiscoveryAdvertisingState
        discoveryAdvertisingState: String) {
        advertisingListeningState = discoveryAdvertisingState
    }
    @objc func context(context: AppContext, didFailIncomingConnectionToPort port: UInt16) {}
