[
	{
		"group": "v3.1.1 DISCONNECT",
		"ver":4,
		"tests": [
			{ "name": "E0 [MQTT-3.1.0-1]", "connack":false, "msgs": [{"type":"send", "payload":"E0 r0"}]},
			{ "name": "E0 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"E0 r268435456"}]},
			{ "name": "E0 long", "msgs": [{"type":"send", "payload":"E0 r1 00"}]},
			{ "name": "E0 valid", "msgs": [{"type":"send", "payload":"E0 r0"}]},
			{ "name": "E1 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E1 r0"}]},
			{ "name": "E2 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E2 r0"}]},
			{ "name": "E4 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E4 r0"}]},
			{ "name": "E8 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E8 r0"}]}
		]
	},
	{
		"group": "v5.0   DISCONNECT",
		"ver":5,
		"tests": [
			{ "name": "E0 [MQTT-3.1.0-1]", "connack":false, "msgs": [{"type":"send", "payload":"E0 r0"}]},
			{ "name": "E0 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"E0 r268435456"}]},
			{ "name": "E0 long", "msgs": [{"type":"send", "payload":"E0 r1 00"}]},
			{ "name": "E0 valid", "msgs": [{"type":"send", "payload":"E0 r0"}]},
			{ "name": "E1 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E1 r0"}]},
			{ "name": "E2 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E2 r0"}]},
			{ "name": "E4 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E4 r0"}]},
			{ "name": "E8 [MQTT-3.14.1-1]", "msgs": [{"type":"send", "payload":"E8 r0"}]},
			{ "name": "E0 RC=0x00 (normal disconnection)", "msgs": [{"type":"send", "payload":"E0 r1 00"}]},
			{ "name": "E0 RC=0x01 (qos 1 - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 01"}]},
			{ "name": "E0 RC=0x04 (disconnect with will)", "msgs": [{"type":"send", "payload":"E0 r1 04"}]},
			{ "name": "E0 RC=0x05 (invalid)", "msgs": [{"type":"send", "payload":"E0 r1 05"}]},
			{ "name": "E0 RC=0x80 (unspecified error)", "msgs": [{"type":"send", "payload":"E0 r1 80"}]},
			{ "name": "E0 RC=0x81 (malformed packet)", "msgs": [{"type":"send", "payload":"E0 r1 81"}]},
			{ "name": "E0 RC=0x82 (protocol error)", "msgs": [{"type":"send", "payload":"E0 r1 82"}]},
			{ "name": "E0 RC=0x83 (implementation specific error)", "msgs": [{"type":"send", "payload":"E0 r1 83"}]},
			{ "name": "E0 RC=0x87 (not authorised - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 87"}]},
			{ "name": "E0 RC=0x89 (server busy - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 89"}]},
			{ "name": "E0 RC=0x8B (server shutting down - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 8B"}]},
			{ "name": "E0 RC=0x8D (keep alive timeout - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 8D"}]},
			{ "name": "E0 RC=0x8E (session taken over - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 8E"}]},
			{ "name": "E0 RC=0x8F (topic filter invalid - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 8F"}]},
			{ "name": "E0 RC=0x90 (topic name invalid)", "msgs": [{"type":"send", "payload":"E0 r1 90"}]},
			{ "name": "E0 RC=0x93 (receive maximum exceeded)", "msgs": [{"type":"send", "payload":"E0 r1 93"}]},
			{ "name": "E0 RC=0x94 (topic alias invalid)", "msgs": [{"type":"send", "payload":"E0 r1 94"}]},
			{ "name": "E0 RC=0x95 (packet too large)", "msgs": [{"type":"send", "payload":"E0 r1 95"}]},
			{ "name": "E0 RC=0x96 (message rate too high)", "msgs": [{"type":"send", "payload":"E0 r1 96"}]},
			{ "name": "E0 RC=0x97 (quota exceeded)", "msgs": [{"type":"send", "payload":"E0 r1 97"}]},
			{ "name": "E0 RC=0x98 (administrative action)", "msgs": [{"type":"send", "payload":"E0 r1 98"}]},
			{ "name": "E0 RC=0x99 (payload format invalid)", "msgs": [{"type":"send", "payload":"E0 r1 99"}]},
			{ "name": "E0 RC=0x9A (retain not supported - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9A"}]},
			{ "name": "E0 RC=0x9B (qos not supported - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9B"}]},
			{ "name": "E0 RC=0x9C (use another server - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9C"}]},
			{ "name": "E0 RC=0x9D (server moved - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9D"}]},
			{ "name": "E0 RC=0x9E (shared subs not supported - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9E"}]},
			{ "name": "E0 RC=0x9F (connection rate exceeded - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 9F"}]},
			{ "name": "E0 RC=0xA0 (maximum connect time - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 A0"}]},
			{ "name": "E0 RC=0xA1 (subscription ids not supported - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 A1"}]},
			{ "name": "E0 RC=0xA2 (wildcard subs not supported - invalid)", "msgs": [{"type":"send", "payload":"E0 r1 A2"}]},
			{ "name": "E0 RC=0x82 PL=0", "msgs": [{"type":"send", "payload":"E0 r2 82 00"}]},
			{ "name": "E0 RC=0x00 PL=1 P=0", "msgs": [{"type":"send", "payload":"E0 r3 00 01 00"}]},
			{ "name": "E0 RC=0x00 PL=1 P=0x11", "msgs": [{"type":"send", "payload":"E0 r3 00 01 11"}]},
			{ "name": "E0 RC=0x00 PL=2 P=0x11", "msgs": [{"type":"send", "payload":"E0 r4 00 02 1100"}]},
			{ "name": "E0 RC=0x00 PL=3 P=0x11", "msgs": [{"type":"send", "payload":"E0 r5 00 03 110000"}]},
			{ "name": "E0 RC=0x00 PL=4 P=0x11", "msgs": [{"type":"send", "payload":"E0 r6 00 04 11000000"}]},
			{ "name": "E0 RC=0x00 PL=5 P=0x11", "msgs": [{"type":"send", "payload":"E0 r7 00 05 1100000000"}]}
		]
	},
	{
		"group": "v5.0   DISCONNECT ALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "E0 with reason-string property", "msgs": [{"type":"send", "payload":"E0 r6 00 04 1F s1 'p'"}]},
			{ "name": "E0 with 2*reason-string property (invalid)", "msgs": [{"type":"send", "payload":"E0 r10 00 v8 1F s1 'p' 1F s1 'q'"}]},
			{ "name": "E0 with reason-string property missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 1F"}]},
			{ "name": "E0 with reason-string property empty", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 1F s0"}]},
			{ "name": "E0 with user-property", "msgs": [{"type":"send", "payload":"E0 r9 00 v7 26 s1 'p' s1 'q'"}]},
			{ "name": "E0 with user-property missing value", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 26 s1 'p'"}]},
			{ "name": "E0 with user-property missing key,value", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 26"}]},
			{ "name": "E0 with user-property empty key", "msgs": [{"type":"send", "payload":"E0 r8 00 v6 26 s0 s1 'p'"}]},
			{ "name": "E0 with user-property empty key,value", "msgs": [{"type":"send", "payload":"E0 r8 00 v6 26 s1 'p' s0"}]},
			{ "name": "E0 with user-property empty key,value", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 26 s0 s0"}]},
			{ "name": "E0 with session-expiry-interval (four byte integer)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 11 L0"}]},
			{ "name": "E0 with 2*session-expiry-interval (four byte integer)", "msgs": [{"type":"send", "payload":"E0 r12 00 v10 11 L0 11 L0"}]},
			{ "name": "E0 with session-expiry-interval (four byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 11"}]},
			{ "name": "E0 with server-reference (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 1C s1 'p'"}]},
			{ "name": "E0 with 2*server-reference (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r10 00 v8 1C s1 'p' 1C s1 'q'"}]},
			{ "name": "E0 with server-reference (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 1C"}]},
			{ "name": "E0 with server-reference (UTF-8 string) empty", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 1C s0"}]}
		]
	},
	{
		"group": "v5.0   DISCONNECT DISALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "E0 with payload-format-indicator (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 01 i0"}]},
			{ "name": "E0 with request-problem-information (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 17 i0"}]},
			{ "name": "E0 with maximum-qos (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 24 i0"}]},
			{ "name": "E0 with retain-available (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 25 i0"}]},
			{ "name": "E0 with wildcard-subscription-available (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 28 i0"}]},
			{ "name": "E0 with subscription-identifier-available (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 29 i0"}]},
			{ "name": "E0 with shared-subscription-available (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 2A i0"}]},
			{ "name": "E0 with payload-format-indicator (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 01"}]},
			{ "name": "E0 with request-problem-information (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 17"}]},
			{ "name": "E0 with maximum-qos (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 24"}]},
			{ "name": "E0 with retain-available (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 25"}]},
			{ "name": "E0 with wildcard-subscription-available (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 28"}]},
			{ "name": "E0 with subscription-identifier-available (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 29"}]},
			{ "name": "E0 with shared-subscription-available (byte) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 2A"}]},
			{ "name": "E0 with message-expiry-interval (four byte integer)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 02 L1"}]},
			{ "name": "E0 with will-delay-interval (four byte integer)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 18 L1"}]},
			{ "name": "E0 with maximum-packet-size (four byte integer)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 27 L1"}]},
			{ "name": "E0 with message-expiry-interval (four byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 02"}]},
			{ "name": "E0 with will-delay-interval (four byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 18"}]},
			{ "name": "E0 with maximum-packet-size (four byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 27"}]},
			{ "name": "E0 with content-type (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 03 s1 'p'"}]},
			{ "name": "E0 with response-topic (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 08 s1 'p'"}]},
			{ "name": "E0 with assigned-client-identifier (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 12 s1 'p'"}]},
			{ "name": "E0 with authentication-method (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 15 s1 'p'"}]},
			{ "name": "E0 with response-information (UTF-8 string)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 1A s1 'p'"}]},
			{ "name": "E0 with content-type (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 03"}]},
			{ "name": "E0 with response-topic (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 08"}]},
			{ "name": "E0 with assigned-client-identifier (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 12"}]},
			{ "name": "E0 with authentication-method (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 15"}]},
			{ "name": "E0 with response-information (UTF-8 string) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 1A"}]},
			{ "name": "E0 with correlation-data (binary data)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 09 s1 'p'"}]},
			{ "name": "E0 with authentication-data (binary data)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 16 s1 'p'"}]},
			{ "name": "E0 with correlation-data (binary data) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 09"}]},
			{ "name": "E0 with authentication-data (binary data) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 16"}]},
			{ "name": "E0 with subscription-identifier (variable byte integer)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0B v1"}]},
			{ "name": "E0 with subscription-identifier (variable byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 0B"}]},
			{ "name": "E0 with server-keep-alive (two byte integer)", "msgs": [{"type":"send", "payload":"E0 r5 00 03 13 H5"}]},
			{ "name": "E0 with receive-maximum (two byte integer)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 21 H5"}]},
			{ "name": "E0 with topic-alias-maximum (two byte integer)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 22 H5"}]},
			{ "name": "E0 with topic-alias (two byte integer)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 23 H5"}]},
			{ "name": "E0 with server-keep-alive (two byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 13"}]},
			{ "name": "E0 with receive-maximum (two byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 21"}]},
			{ "name": "E0 with topic-alias-maximum (two byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 22"}]},
			{ "name": "E0 with topic-alias (two byte integer) missing", "msgs": [{"type":"send", "payload":"E0 r3 00 v1 23"}]},
			{ "name": "E0 with invalid-property 0x00 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 00 i1"}]},
			{ "name": "E0 with unknown-property 0x04 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 04 i1"}]},
			{ "name": "E0 with unknown-property 0x05 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 05 i1"}]},
			{ "name": "E0 with unknown-property 0x06 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 06 i1"}]},
			{ "name": "E0 with unknown-property 0x07 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 07 i1"}]},
			{ "name": "E0 with unknown-property 0x0A (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0A i1"}]},
			{ "name": "E0 with unknown-property 0x0C (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0C i1"}]},
			{ "name": "E0 with unknown-property 0x0D (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0D i1"}]},
			{ "name": "E0 with unknown-property 0x0E (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0E i1"}]},
			{ "name": "E0 with unknown-property 0x0F (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 0F i1"}]},
			{ "name": "E0 with unknown-property 0x10 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 10 i1"}]},
			{ "name": "E0 with unknown-property 0x14 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 14 i1"}]},
			{ "name": "E0 with unknown-property 0x1B (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 1B i1"}]},
			{ "name": "E0 with unknown-property 0x1D (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 1D i1"}]},
			{ "name": "E0 with unknown-property 0x1E (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 1E i1"}]},
			{ "name": "E0 with unknown-property 0x20 (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 20 i1"}]},
			{ "name": "E0 with unknown-property 0x7F (byte)", "msgs": [{"type":"send", "payload":"E0 r4 00 v2 7F i1"}]},
			{ "name": "E0 with invalid-property 0x8000 (byte)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 8000 i1"}]},
			{ "name": "E0 with unknown-property 0x8001 (byte)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 8001 i1"}]},
			{ "name": "E0 with unknown-property 0xFF7F (byte)", "msgs": [{"type":"send", "payload":"E0 r5 00 v3 FF7F i1"}]},
			{ "name": "E0 with unknown-property 0x808001 (byte)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 808001 i1"}]},
			{ "name": "E0 with unknown-property 0xFFFF7F (byte)", "msgs": [{"type":"send", "payload":"E0 r6 00 v4 FFFF7F i1"}]},
			{ "name": "E0 with unknown-property 0x80808001 (byte)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 80808001 i1"}]},
			{ "name": "E0 with unknown-property 0xFFFFFF7F (byte)", "msgs": [{"type":"send", "payload":"E0 r7 00 v5 FFFFFF7F i1"}]}
		]
	}
]
