[
	{
		"group": "v3.1.1 UNSUBSCRIBE",
		"ver":4,
		"tests": [
			{ "name": "A2 [MQTT-3.1.0-1]", "connect":false, "msgs": [{"type":"send", "payload":"A2 r5 m1234 s1 'p'"}]},
			{ "name": "A2 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"A2 r268435456"}]},
			{ "name": "A2 (no subscribe) [MQTT-3.10.4-5]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r5 m1234 s1 'p'"},
				{"type":"recv", "payload":"B0 r2 m1234"}
			]},
			{ "name": "A2 (with subscribe) [MQTT-3.10.4-5]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"82 r6 m1234 s1 'p' 00"},
				{"type":"recv", "payload":"90 r3 m1234 00"},
				{"type":"send", "payload":"A2 r5 m1234 s1 'p'"},
				{"type":"recv", "payload":"B0 r2 m1234"}
			]},
			{ "name": "A2 multiple [MQTT-3.10.4-6]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r8 m1234 s1 'p' s1 'q'"},
				{"type":"recv", "payload":"B0 r2 m1234"}
			]},
			{ "name": "A2 multiple zero 1st", "msgs": [{"type":"send", "payload":"A2 r7 m1234 0000 s1 'q'"}]},
			{ "name": "A2 multiple zero 2nd", "msgs": [{"type":"send", "payload":"A2 r7 m1234 s1 'q' 0000"}]},
			{ "name": "A2 short 4", "msgs": [{"type":"send", "payload":"A2 r4 m1234 0001"}]},
			{ "name": "A2 short 3", "msgs": [{"type":"send", "payload":"A2 r3 m1234 01"}]},
			{ "name": "A2 short 2 [MQTT-3.10.3-2]", "msgs": [{"type":"send", "payload":"A2 r2 m1234"}]},
			{ "name": "A2 short 1", "msgs": [{"type":"send", "payload":"A2 r1 12"}]},
			{ "name": "A2 short 0", "msgs": [{"type":"send", "payload":"A2 r0"}]},
			{ "name": "A0 [MQTT-3.10.1-1]", "msgs": [{"type":"send", "payload":"A0 r5 m1234 s1 'p'"}]},
			{ "name": "A3 [MQTT-3.10.1-1]", "msgs": [{"type":"send", "payload":"A3 r5 m1234 s1 'p'"}]},
			{ "name": "A4 [MQTT-3.10.1-1]", "msgs": [{"type":"send", "payload":"A4 r5 m1234 s1 'p'"}]},
			{ "name": "A6 [MQTT-3.10.1-1]", "msgs": [{"type":"send", "payload":"A6 r5 m1234 s1 'p'"}]},
			{ "name": "AA [MQTT-3.10.1-1]", "msgs": [{"type":"send", "payload":"AA r5 m1234 s1 'p'"}]},
			{ "name": "A2 topic with 0x0000", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746F700000"}]},
			{ "name": "A2 topic with U+D800", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746FEDA080"}]},
			{ "name": "A2 topic with U+0001", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746F700170"}]},
			{ "name": "A2 topic with U+001F", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746F701F70"}]},
			{ "name": "A2 topic with U+007F", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746F707F70"}]},
			{ "name": "A2 topic with U+009F", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746FC29F70"}]},
			{ "name": "A2 topic with U+FFFF", "msgs": [{"type":"send", "payload":"A2 r9 m1234 s5 746FEDBFBF"}]},
			{ "name": "A2 zero mid", "msgs": [ {"type":"send", "payload":"A2 r8 0000 s1 'p' s1 'q'"}]}
		]
	},
	{
		"group": "v5.0   UNSUBSCRIBE",
		"ver":5,
		"tests": [
			{ "name": "A2 [MQTT-3.1.0-1]", "connect":false, "msgs": [{"type":"send", "payload":"A2 r6 m1234 00 s1 'p'"}]},
			{ "name": "A2 remaining length 5 bytes", "msgs":[{"type":"send", "payload":"A2 r268435456"}]},
			{ "name": "A2 (no subscribe) [MQTT-3.10.4-5]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1234 v0 11"}
			]},
			{ "name": "A2 (with subscribe) [MQTT-3.10.4-5]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"82 r7 m1234 v0 s1 'p' 00"},
				{"type":"recv", "payload":"90 r4 m1234 v0 00"},
				{"type":"send", "payload":"A2 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1234 v0 00"}
			]},
			{ "name": "A2 multiple zero 1st", "msgs": [
				{"type":"send", "payload":"A2 r8 m1234 v0 0000 s1 'q'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 multiple zero 2nd", "msgs": [
				{"type":"send", "payload":"A2 r8 m1234 v0 s1 'q' 0000"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 5", "msgs": [
				{"type":"send", "payload":"A2 r5 m1234 v0 0001"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 4", "msgs": [
				{"type":"send", "payload":"A2 r4 m1234 v0 01"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 3 [MQTT-3.10.3-2]", "msgs": [
				{"type":"send", "payload":"A2 r3 m1234 v0"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 2", "msgs": [
				{"type":"send", "payload":"A2 r1 1234"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 1", "msgs": [
				{"type":"send", "payload":"A2 r1 12"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 short 0", "msgs": [
				{"type":"send", "payload":"A2 r0"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A0 [MQTT-3.10.1-1]", "msgs": [
				{"type":"send", "payload":"A0 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A3 [MQTT-3.10.1-1]", "msgs": [
				{"type":"send", "payload":"A3 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A4 [MQTT-3.10.1-1]", "msgs": [
				{"type":"send", "payload":"A4 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A6 [MQTT-3.10.1-1]", "msgs": [
				{"type":"send", "payload":"A6 r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "AA [MQTT-3.10.1-1]", "msgs": [
				{"type":"send", "payload":"AA r6 m1234 v0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with 0x0000", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746F700000"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+D800", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746FEDA080"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+0001", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746F700170"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+001F", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746F701F70"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+007F", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746F707F70"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+009F", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746FC29F70"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 topic with U+FFFF", "msgs": [
				{"type":"send", "payload":"A2 r10 m1234 v0 s5 746FEDBFBF"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 multiple [MQTT-3.10.4-6]", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r9 m1234 v0 s1 'p' s1 'q'"},
				{"type":"recv", "payload":"B0 r5 m1234 v0 11 11"}
			]},
			{ "name": "A2 zero mid", "msgs": [
				{"type":"send", "payload":"A2 r6 m0 00 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]}
		]
	},
	{
		"group": "v5.0   UNSUBSCRIBE ALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "A2 with user-property", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r13 m1 v7 26 s1 'p' s1 'q' s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1 00 11"}
			]},
			{ "name": "A2 with 2*user-property", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r20 m1 v14 26 s1 'p' s1 'q' 26 s1 'p' s1 'q' s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1 00 11"}
			]},
			{ "name": "A2 with user-property missing value", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 26 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with user-property missing key,value", "msgs": [
				{"type":"send", "payload":"A2 r7 m1 v1 26 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with user-property empty key", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r12 m1 v6 26 s0 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1 00 11"}
			]},
			{ "name": "A2 with user-property empty value", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r12 m1 v6 26 s1 'p' s0 s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1 00 11"}
			]},
			{ "name": "A2 with user-property empty key,value", "expect_disconnect":false, "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 26 s0 s0 s1 'p'"},
				{"type":"recv", "payload":"B0 r4 m1 00 11"}
			]}
		]
	},
	{
		"group": "v5.0   UNSUBSCRIBE DISALLOWED PROPERTIES",
		"ver":5,
		"tests": [
			{ "name": "A2 with payload-format-indicator (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 01 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with request-problem-information (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 17 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with maximum-qos (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 24 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with retain-available (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 25 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with wildcard-subscription-available (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 28 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with subscription-identifier-available (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 29 i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with shared-subscription-available (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 2A i0 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with message-expiry-interval (four byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 02 L1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with session-expiry-interval (four byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 11 L1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with will-delay-interval (four byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 18 L1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with maximum-packet-size (four byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 27 L1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with content-type (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 03 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with response-topic (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 08 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with assigned-client-identifier (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 12 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with authentication-method (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 15 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with response-information (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 1A s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with server-reference (UTF-8 string)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 1C s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with correlation-data (binary data)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 09 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with authentication-data (binary data)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 16 s1 'p' s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with subscription-identifier (variable byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0B v1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with server-keep-alive (two byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 13 H5 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with receive-maximum (two byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 21 H5 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with topic-alias-maximum (two byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 22 H5 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with topic-alias (two byte integer)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 23 H5 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},

			{ "name": "A2 with invalid-property 0x00 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 00 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x04 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 04 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x05 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 05 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x06 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 06 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x07 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 07 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x0A (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0A i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x0C (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0C i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x0D (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0D i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x0E (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0E i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x0F (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 0F i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x10 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 10 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x14 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 14 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x1B (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 1B i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x1D (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 1D i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x1E (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 1E i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x20 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 20 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x7F (byte)", "msgs": [
				{"type":"send", "payload":"A2 r8 m1 v2 7F i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with invalid-property 0x8000 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 8000 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x8001 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 8001 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0xFF7F (byte)", "msgs": [
				{"type":"send", "payload":"A2 r9 m1 v3 FF7F i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x808001 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 808001 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0xFFFF7F (byte)", "msgs": [
				{"type":"send", "payload":"A2 r10 m1 v4 FFFF7F i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0x80808001 (byte)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 80808001 i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]},
			{ "name": "A2 with unknown-property 0xFFFFFF7F (byte)", "msgs": [
				{"type":"send", "payload":"A2 r11 m1 v5 FFFFFF7F i1 s1 'p'"},
				{"type":"recv", "payload":"E0 r1 81"}
			]}
		]
	}
]
