[
	{
		"group": "v3.1.1 SUBSCRIBE",
		"ver":4,
		"tests": [
			{ "name": "82 [MQTT-3.1.0-1]", "connack":false, "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 00"}]},
			{ "name": "82 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"82 r268435456"}]},
			{ "name": "80", "msgs": [{"type":"send", "payload":"80 r6 m1234 s1 'p' 00"}]},
			{ "name": "83 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"83 r6 m1234 s1 'p' 00"}]},
			{ "name": "84 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"84 r6 m1234 s1 'p' 00"}]},
			{ "name": "86 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"86 r6 m1234 s1 'p' 00"}]},
			{ "name": "8A [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"8A r6 m1234 s1 'p' 00"}]},
			{ "name": "82 QoS 3 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 03"}]},
			{ "name": "82 QoS 0x04 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 04"}]},
			{ "name": "82 QoS 0x08 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 08"}]},
			{ "name": "82 QoS 0x10 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 10"}]},
			{ "name": "82 QoS 0x20 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 20"}]},
			{ "name": "82 QoS 0x40 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 40"}]},
			{ "name": "82 QoS 0x80 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 80"}]},
			{ "name": "82 topic with 0x0000", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746F700000 00"} ] },
			{ "name": "82 topic with U+D800", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746FEDA080 00"} ] },
			{ "name": "82 topic with U+0001", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746F700170 00"} ] },
			{ "name": "82 topic with U+001F", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746F701F70 00"} ] },
			{ "name": "82 topic with U+007F", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746F707F70 00"} ] },
			{ "name": "82 topic with U+009F", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746FC29F70 00"} ] },
			{ "name": "82 topic with U+FFFF", "msgs": [{"type":"send", "payload":"82 r10 m1234 s5 746FEDBFBF 00"} ] },
			{ "name": "82 long", "msgs": [{"type":"send", "payload":"82 r7 m1234 s1 'p' 00 00"}]},
			{ "name": "82 short 5 [MQTT-3.8.3-3]", "msgs": [{"type":"send", "payload":"82 05 m1234 s1 'p'"}]},
			{ "name": "82 short 4", "msgs": [{"type":"send", "payload":"82 r4 m1234 0000"}]},
			{ "name": "82 short 3", "msgs": [{"type":"send", "payload":"82 r3 m1234 00"}]},
			{ "name": "82 short 2", "msgs": [{"type":"send", "payload":"82 r2 1234"}]},
			{ "name": "82 short 1", "msgs": [{"type":"send", "payload":"82 r1 12"}]},
			{ "name": "82 short 0", "msgs": [{"type":"send", "payload":"82 r0"}]},
			{ "name": "82 single topic len 0", "msgs": [{"type":"send", "payload":"82 r5 m1234 s0 00"}]},
			{ "name": "82 multiple topic 1 len 0", "msgs": [{"type":"send", "payload":"82 r9 m1234 s0 00 s1 'q' 00"}]},
			{ "name": "82 multiple topic 2 len 0", "msgs": [{"type":"send", "payload":"82 r9 m1234 s1 'q' 00 s0 00"}]},
			{ "name": "82 multiple topic 1,2 len 0", "msgs": [{"type":"send", "payload":"82 r8 m1234 s0 00 s0 00"}]},
			{ "name": "82 mid 0", "msgs": [{"type":"send", "payload":"82 r6 m0 s1 'p' 00"}]},
			{ "name": "82 single ok QoS 0 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 00"}]},
			{ "name": "82 single ok QoS 1 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 01"}]},
			{ "name": "82 single ok QoS 2 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r6 m1234 s1 'p' 02"}]},
			{ "name": "82 multiple ok [MQTT-3.8.4-4]", "msgs": [{"type":"send", "payload":"82 r10 m1234 s1 'p' 00 s1 'q' 00"}]}
		]
	},
	{
		"group": "v5.0   SUBSCRIBE",
		"ver":5,
		"tests": [
			{ "name": "82 [MQTT-3.1.0-1]", "connack":false, "msgs": [{"type":"send", "payload":"82 07 m1234 v0 s1 'p' 00"}]},
			{ "name": "82 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"82 r268435456"}]},
			{ "name": "82 single ok QoS 0 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 07 m1234 v0 s1 'p' 00"}]},
			{ "name": "82 single ok QoS 1 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 07 m1234 v0 s1 'p' 01"}]},
			{ "name": "82 single ok QoS 2 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 07 m1234 v0 s1 'p' 02"}]},
			{ "name": "80", "msgs": [{"type":"send", "payload":"80 r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "83 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"83 r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "84 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"84 r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "86 [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"86 r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "8A [MQTT-3.8.1-1]", "msgs": [{"type":"send", "payload":"8A r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "82 QoS 3 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 03"}]},
			{ "name": "82 QoS 0 no local 0x04", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 04"}]},
			{ "name": "82 QoS 0 retain as published 0x08", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 08"}]},
			{ "name": "82 QoS 0 retain handling=1 0x10", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 10"}]},
			{ "name": "82 QoS 0 retain handling=2 0x20", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 20"}]},
			{ "name": "82 QoS 0 retain handling=3 0x30 [MQTT-3-8.3-4]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 30"}]},
			{ "name": "82 QoS 0x40 [MQTT-3-8.3-5]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 40"}]},
			{ "name": "82 QoS 0x80 [MQTT-3-8.3-5]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 80"}]},
			{ "name": "82 topic with 0x0000", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746F700000 'payload' 00"}]},
			{ "name": "82 topic with U+D800", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746FEDA080 'payload' 00"}]},
			{ "name": "82 topic with U+0001", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746F700170 'payload' 00"}]},
			{ "name": "82 topic with U+001F", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746F701F70 'payload' 00"}]},
			{ "name": "82 topic with U+007F", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746F707F70 'payload' 00"}]},
			{ "name": "82 topic with U+009F", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746FC29F70 'payload' 00"}]},
			{ "name": "82 topic with U+FFFF", "msgs": [{"type":"send", "payload":"82 r18 m1234 v0 s5 746FEDBFBF 'payload' 00"}]},
			{ "name": "82 long", "msgs": [{"type":"send", "payload":"82 r8 m1234 v0 s1 'p' 00 00"}]},
			{ "name": "82 short 5 [MQTT-3.8.3-3]", "msgs": [{"type":"send", "payload":"82 06 m1234 v0 0001 70"}]},
			{ "name": "82 short 5", "msgs": [{"type":"send", "payload":"82 r5 m1234 v0 0000"}]},
			{ "name": "82 short 4", "msgs": [{"type":"send", "payload":"82 r4 m1234 v0 00"}]},
			{ "name": "82 short 3", "msgs": [{"type":"send", "payload":"82 r3 m1234 v0"}]},
			{ "name": "82 short 2", "msgs": [{"type":"send", "payload":"82 r2 m1234"}]},
			{ "name": "82 short 1", "msgs": [{"type":"send", "payload":"82 r1 12"}]},
			{ "name": "82 short 0", "msgs": [{"type":"send", "payload":"82 r0"}]},
			{ "name": "82 single topic len 0", "msgs": [{"type":"send", "payload":"82 r6 m1234 v0 0000 00"}]},
			{ "name": "82 multiple topic 1 len 0", "msgs": [{"type":"send", "payload":"82 r10 m1234 v0 0000 00 s1 'q' 00"}]},
			{ "name": "82 multiple topic 2 len 0", "msgs": [{"type":"send", "payload":"82 r10 m1234 v0 s1 'q' 00 0000 00"}]},
			{ "name": "82 multiple topic 1,2 len 0", "msgs": [{"type":"send", "payload":"82 r9 m1234 v0 0000 00 0000 00"}]},
			{ "name": "82 single ok QoS 0 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 00"}]},
			{ "name": "82 single ok QoS 1 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 01"}]},
			{ "name": "82 single ok QoS 2 [MQTT-3.8.4-1]", "msgs": [{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 02"}]},
			{ "name": "82 multiple ok [MQTT-3.8.4-4]", "msgs": [{"type":"send", "payload":"82 r11 m1234 v0 s1 'p' 00 s1 'q' 00"}]},
			{ "name": "82 mid 0", "msgs": [{"type":"send", "payload":"82 r7 m0 v0 s1 'p' 00"}]}
		]
	},
	{
		"group": "v5.0   SUBSCRIBE ALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "82 with user-property", "msgs": [{"type":"send", "payload":"82 r14 m1 v7 26 s1 'p' s1 'q' s1 'p' 00"}]},
			{ "name": "82 with 2*user-property", "msgs": [{"type":"send", "payload":"82 r21 m1 v14 26 s1 'p' s1 'q' 26 s1 'p' s1 'q' s1 'p' 00"}]},
			{ "name": "82 with user-property missing value", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 26 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with user-property missing key,value", "msgs": [{"type":"send", "payload":"82 r8 m1 v1 26 s1 'p' 00"}]},
			{ "name": "82 with user-property empty key", "msgs": [{"type":"send", "payload":"82 r13 m1 v6 26 0000 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with user-property empty value", "msgs": [{"type":"send", "payload":"82 r13 m1 v6 26 s1 'p' s0 s1 'p' 00"}]},
			{ "name": "82 with user-property empty key,value", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 26 s0 s0 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier missing (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r8 m1 v1 0B s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0B v0 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=1 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0B v8 s1 'p' 00"}]},
			{ "name": "82 with 2*subscription-identifier=1 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 0B v1 0B i1 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x7F (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0B 7F s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x8000 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 0B 8000 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x8001 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 0B 8001 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0xFF7F (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 0B FF7F s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x808001 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 0B 808001 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0xFFFF7F (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 0B FFFF7F s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x80808001 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 0B 80808001 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0xFFFFFF7F (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 0B FFFFFF7F s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier=0x8080808001 (variable byte integer)", "msgs": [{"type":"send", "payload":"82 r13 m1 v6 0B 8080808001 s1 'p' 00"}]}
		]
	},
	{
		"group": "v5.0   SUBSCRIBE DISALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "82 with payload-format-indicator (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 01 i0 s1 'p' 00"}]},
			{ "name": "82 with request-problem-information (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 17 i0 s1 'p' 00"}]},
			{ "name": "82 with maximum-qos (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 24 i0 s1 'p' 00"}]},
			{ "name": "82 with retain-available (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 25 i0 s1 'p' 00"}]},
			{ "name": "82 with wildcard-subscription-available (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 28 i0 s1 'p' 00"}]},
			{ "name": "82 with subscription-identifier-available (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 29 i0 s1 'p' 00"}]},
			{ "name": "82 with shared-subscription-available (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 02 2A i0 s1 'p' 00"}]},
			{ "name": "82 with message-expiry-interval (four byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 02 L1 s1 'p' 00"}]},
			{ "name": "82 with session-expiry-interval (four byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 11 L1 s1 'p' 00"}]},
			{ "name": "82 with will-delay-interval (four byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 18 L1 s1 'p' 00"}]},
			{ "name": "82 with maximum-packet-size (four byte integer)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 27 L1 s1 'p' 00"}]},
			{ "name": "82 with content-type (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 03 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with response-topic (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 08 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with assigned-client-identifier (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 12 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with authentication-method (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 15 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with response-information (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 1A s1 'p' s1 'p' 00"}]},
			{ "name": "82 with server-reference (UTF-8 string)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 1C s1 'p' s1 'p' 00"}]},
			{ "name": "82 with correlation-data (binary data)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 09 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with authentication-data (binary data)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 16 s1 'p' s1 'p' 00"}]},
			{ "name": "82 with server-keep-alive (two byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 13 H5 s1 'p' 00"}]},
			{ "name": "82 with receive-maximum (two byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 21 H5 s1 'p' 00"}]},
			{ "name": "82 with topic-alias-maximum (two byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 22 H5 s1 'p' 00"}]},
			{ "name": "82 with topic-alias (two byte integer)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 23 H5 s1 'p' 00"}]},
			{ "name": "82 with invalid-property 0x00 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 m1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x04 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 04 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x05 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 05 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x06 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 06 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x07 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 07 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x0A (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0A i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x0C (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0C i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x0D (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0D i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x0E (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0E i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x0F (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 0F i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x10 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 10 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x14 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 14 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x1B (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 1B i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x1D (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 1D i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x1E (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 1E i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x20 (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 20 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x7F (byte)", "msgs": [{"type":"send", "payload":"82 r9 m1 v2 7F i1 s1 'p' 00"}]},
			{ "name": "82 with invalid-property 0x8000 (byte)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 8000 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x8001 (byte)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 8001 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0xFF7F (byte)", "msgs": [{"type":"send", "payload":"82 r10 m1 v3 FF7F i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x808001 (byte)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 808001 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0xFFFF7F (byte)", "msgs": [{"type":"send", "payload":"82 r11 m1 v4 FFFF7F i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0x80808001 (byte)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 80808001 i1 s1 'p' 00"}]},
			{ "name": "82 with unknown-property 0xFFFFFF7F (byte)", "msgs": [{"type":"send", "payload":"82 r12 m1 v5 FFFFFF7F i1 s1 'p' 00"}]}
		]
	}
]
