         XCTAssertEqual(peerAvailability.available,
                        dictionaryValue[JSONKey.peerAvailable.rawValue] as? Bool)
     }
-
+    
     func testDisconnectErrors() {
         var contextError: AppContextError?
         do {

        validateAdvertisingUpdate(delegateMock.advertisingListeningState, advertising: true,
                                  browsing: false)
    }

    func testListeningAdvertisingUpdateOnStartListening() {
        let delegateMock = AppContextDelegateMock(peerAvailabilityChangedHandler: { _ in
            XCTFail("unexpected peerAvailabilityChanged event")


// MARK: - Random string generator
extension String {
    
    static func random(length length: Int) -> String {
        let letters: String = "abcdefghkmnopqrstuvxyzABCDEFGHKLMNOPQRSTUXYZ"
        var randomString = ""
        
        let lettersLength = UInt32(letters.characters.count)
        for _ in 0..<length {
            let rand = Int(arc4random_uniform(lettersLength))
