     }
     
     func testNoRegistrations() {
-        //performServerTest(TestServerDelegate()) { expectation in
-        //    guard let socket = self.sendUpgradeRequest() else { return }
-        //
-        //    guard let response = self.processUpgradeResponse(socket: socket) else { return }
-        //
-        //}
+        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? {

        return socket
    }
    
    private func processUpgradeResponse(socket: Socket) -> HTTPIncomingMessage? {
        var response: HTTPIncomingMessage? = HTTPIncomingMessage(isRequest: false)
        
        var keepProcessing = true
        let buffer = NSMutableData()

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