         }
     }
     
-    func testDiscovery() {
-        
-        /**
-         Read: [2, 185, 0]
-         Send: [3, 200, 0]
-         Read: [16, 1, 0, 255, 255, 0, 40]
-         Send: [17, 20, 1, 0, 6, 0, 231, 207, 159, 173, 34, 222, 166, 180, 145, 78, 37, 213, 23, 49, 212, 52, 7, 0, 12, 0, 251, 52, 155, 95, 128, 0, 0, 128, 0, 16, 0, 0, 169, 254, 0, 0, 13, 0, 18, 0, 178, 26, 190, 138, 180, 130, 146, 145, 222, 73, 117, 102, 201, 67, 100, 139]
-         Read: [16, 19, 0, 255, 255, 0, 40]
-         Send: [1, 16, 19, 0, 10]
-         Read: [8, 1, 0, 6, 0, 3, 40]
-         Send: [9, 21, 2, 0, 16, 3, 0, 153, 234, 51, 69, 164, 205, 80, 147, 177, 76, 242, 125, 196, 139, 229, 43, 5, 0, 8, 6, 0, 174, 253, 204, 198, 23, 135, 52, 155, 155, 75, 219, 59, 176, 229, 202, 148]
-         Read: [8, 7, 0, 12, 0, 3, 40]
-         Send: [9, 21, 8, 0, 18, 9, 0, 1, 0, 0, 87, 39, 220, 216, 142, 254, 77, 227, 3, 128, 24, 131, 204, 11, 0, 8, 12, 0, 2, 0, 0, 87, 39, 220, 216, 142, 254, 77, 227, 3, 128, 24, 131, 204]
-         Read: [4, 4, 0, 4, 0]
-         Send: [5, 1, 4, 0, 2, 41]
-         Read: [18, 4, 0, 1, 0]
-         */
+    func testDescriptor() {
         
         do {
             

        ("testWrite", testWrite),
        ("testFindInformation", testFindInformation),
        ("testConfigureClientDescriptor", testConfigureClientDescriptor),
        ("testDiscovery", testDiscovery)
    ]
    
    func testATTOpcode() {

            XCTAssertEqual(pdu.byteValue, data)
            XCTAssertEqual(pdu.serverMTU, 200)
        }
        
        do {
            
            let data: [UInt8] = [16, 1, 0, 255, 255, 0, 40]
            
            guard let pdu = ATTReadByGroupTypeRequest(byteValue: data)
                else { XCTFail("Could not parse"); return }
            
            XCTAssertEqual(pdu.byteValue, data)
            XCTAssertEqual(pdu.type, BluetoothUUID.primaryService)
            XCTAssertEqual(pdu.startHandle, 0x0001)
            XCTAssertEqual(pdu.endHandle, .max)
        }
        
        do {
            
            let data: [UInt8] = [17, 20, 1, 0, 6, 0, 231, 207, 159, 173, 34, 222, 166, 180, 145, 78, 37, 213, 23, 49, 212, 52, 7, 0, 12, 0, 251, 52, 155, 95, 128, 0, 0, 128, 0, 16, 0, 0, 169, 254, 0, 0, 13, 0, 18, 0, 178, 26, 190, 138, 180, 130, 146, 145, 222, 73, 117, 102, 201, 67, 100, 139]
            
            guard let pdu = ATTReadByGroupTypeResponse(byteValue: data)
                else { XCTFail("Could not parse"); return }
            
            print(pdu)
            
            XCTAssertEqual(pdu.byteValue, data)
            XCTAssertEqual(pdu.data.count, 3)
            
            XCTAssertEqual(pdu.data[0].attributeHandle, 1)
            XCTAssertEqual(pdu.data[0].endGroupHandle, 6)
            XCTAssertEqual(BluetoothUUID(littleEndian: BluetoothUUID(data: Data(pdu.data[0].value))!).rawValue,
                           "34D43117-D525-4E91-B4A6-DE22AD9FCFE7")
            
            XCTAssertEqual(pdu.data[1].attributeHandle, 7)
            XCTAssertEqual(pdu.data[1].endGroupHandle, 12)
            XCTAssertEqual(BluetoothUUID(littleEndian: BluetoothUUID(data: Data(pdu.data[1].value))!).rawValue,
                           "0000FEA9-0000-1000-8000-00805F9B34FB")
            
            XCTAssertEqual(pdu.data[2].attributeHandle, 13)
            XCTAssertEqual(pdu.data[2].endGroupHandle, 18)
            XCTAssertEqual(BluetoothUUID(littleEndian: BluetoothUUID(data: Data(pdu.data[2].value))!).rawValue,
                           "8B6443C9-6675-49DE-9192-82B48ABE1AB2")
        }
        
        do {
            
            let data: [UInt8] = [16, 19, 0, 255, 255, 0, 40]
            
            guard let pdu = ATTReadByGroupTypeRequest(byteValue: data)
                else { XCTFail("Could not parse"); return }
            
            XCTAssertEqual(pdu.byteValue, data)
            XCTAssertEqual(pdu.type, BluetoothUUID.primaryService)
            XCTAssertEqual(pdu.startHandle, 19)
            XCTAssertEqual(pdu.endHandle, .max)
        }
        
        do {
            
            let data: [UInt8] = [1, 16, 19, 0, 10]
            
            guard let pdu = ATTErrorResponse(byteValue: data)
                else { XCTFail("Could not parse"); return }
            
            XCTAssertEqual(pdu.byteValue, data)
            XCTAssertEqual(pdu.errorCode, .attributeNotFound)
            XCTAssertEqual(pdu.attributeHandle, 19)
            XCTAssertEqual(pdu.requestOpcode, .readByGroupTypeRequest)
        }
    }
}
