     
     static var allTests : [(String, (UpgradeTests) -> () throws -> Void)] {
         return [
-            ("testNoRegistrations", testNoRegistrations)
+            ("testNoRegistrations", testNoRegistrations),
+            ("testWrongRegistration", testWrongRegistration)
         ]
     }
     

            while keepProcessing {
                buffer.length = 0
                let count = try socket.read(into: buffer)
                if count != 0 {
                    
                }
                else {
                    
                }
            }
        }
        catch let error {
            response = nil
            XCTFail("Failed to send upgrade request. Error=\(error)")
        }
        return response
    }
    
    class TestServerDelegate : ServerDelegate {

    }
    
    func testNoRegistrations() {
        ConnectionUpgrader.clear()
        
        performServerTest(TestServerDelegate()) { expectation in
            
            guard let socket = self.sendUpgradeRequest() else { return }

            let (rawResponse, _) = self.processUpgradeResponse(socket: socket)

            guard let response = rawResponse else { return }
            
            XCTAssertEqual(response.httpStatusCode, HTTPStatusCode.notFound, "Returned status code on upgrade request was \(response.httpStatusCode) and not \(HTTPStatusCode.notFound)")
            
            expectation.fulfill()
        }
    }
    
    
    
    func testWrongRegistration() {
        ConnectionUpgrader.clear()
        
        performServerTest(TestServerDelegate()) { expectation in
            
            guard let socket = self.sendUpgradeRequest() else { return }
            
            let (rawResponse, _) = self.processUpgradeResponse(socket: socket)
            
            guard let response = rawResponse else { return }
            
            XCTAssertEqual(response.httpStatusCode, HTTPStatusCode.notFound, "Returned status code on upgrade request was \(response.httpStatusCode) and not \(HTTPStatusCode.notFound)")
            
            expectation.fulfill()
        }
    }
    
    private func sendUpgradeRequest() -> Socket? {
