[
	{
		"group": "v3.1.1 PUBCOMP",
		"tests": [
			{ "name": "70 [MQTT-3.1.0-1]", "ver":4, "connect":false, "msgs": [{"type":"send", "payload":"70 02 0001"}]},
			{ "name": "70 unsolicited long", "ver":4, "msgs": [{"type":"send", "payload":"70 03 0001 00"}]},
			{ "name": "70 unsolicited mid 0", "ver":4, "msgs": [{"type":"send", "payload":"70 02 0000"}]},
			{ "name": "70 unsolicited short 0", "ver":4, "msgs": [{"type":"send", "payload":"70 00"}]},
			{ "name": "70 unsolicited short 1", "ver":4, "msgs": [{"type":"send", "payload":"70 01 01"}]},
			{ "name": "70 unsolicited", "ver":4, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 02 0001"}]},
			{ "name": "71 unsolicited", "ver":4, "msgs": [{"type":"send", "payload":"71 02 0001"}]},
			{ "name": "72 unsolicited", "ver":4, "msgs": [{"type":"send", "payload":"72 02 0001"}]},
			{ "name": "74 unsolicited", "ver":4, "msgs": [{"type":"send", "payload":"74 02 0001"}]},
			{ "name": "78 unsolicited", "ver":4, "msgs": [{"type":"send", "payload":"78 02 0001"}]}
		]
	},
	{
		"group": "v5.0   PUBCOMP",
		"tests": [
			{ "name": "70 [MQTT-3.1.0-1]", "ver":5, "connect":false, "msgs": [{"type":"send", "payload":"70 02 0001"}]},
			{ "name": "70 unsolicited long", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 00 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 unsolicited mid 0", "ver":5, "msgs": [
				{"type":"send", "payload":"70 02 00 00"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 unsolicited short 0", "ver":5, "msgs": [
				{"type":"send", "payload":"70 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 unsolicited short 1", "ver":5, "msgs": [
				{"type":"send", "payload":"70 01 01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 unsolicited short 3", "ver":5, "FIXME":"strictly, a short 3 should be malformed", "msgs": [
				{"type":"send", "payload":"70 03 0001 80"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 unsolicited", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 02 0001"}]},
			{ "name": "70 unsolicited rc", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 03 0001 00"}]},
			{ "name": "70 unsolicited rc=92", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 03 0001 92"}]},
			{ "name": "70 unsolicited rc=20", "ver":5, "msgs": [
				{"type":"send", "payload":"70 03 0001 20"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 unsolicited rc=FF", "ver":5, "msgs": [
				{"type":"send", "payload":"70 03 0001 FF"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 unsolicited rc,properties", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 04 0001 00 00"}]},
			{ "name": "71 unsolicited", "ver":5, "msgs": [
				{"type":"send", "payload":"71 02 0001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "72 unsolicited", "ver":5, "msgs": [
				{"type":"send", "payload":"72 02 0001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "74 unsolicited", "ver":5, "msgs": [
				{"type":"send", "payload":"74 02 0001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "78 unsolicited", "ver":5, "msgs": [
				{"type":"send", "payload":"78 02 0001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "71 unsolicited rc", "ver":5, "msgs": [
				{"type":"send", "payload":"71 03 0001 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "72 unsolicited rc", "ver":5, "msgs": [
				{"type":"send", "payload":"72 03 0001 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "74 unsolicited rc", "ver":5, "msgs": [
				{"type":"send", "payload":"74 03 0001 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "78 unsolicited rc", "ver":5, "msgs": [
				{"type":"send", "payload":"78 03 0001 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "71 unsolicited rc,properties", "ver":5, "msgs": [
				{"type":"send", "payload":"71 04 0001 00 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "72 unsolicited rc,properties", "ver":5, "msgs": [
				{"type":"send", "payload":"72 04 0001 00 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "74 unsolicited rc,properties", "ver":5, "msgs": [
				{"type":"send", "payload":"74 04 0001 00 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "78 unsolicited rc,properties", "ver":5, "msgs": [
				{"type":"send", "payload":"78 04 0001 00 00"},
				{"type":"recv", "payload":"E0 01 81"}
			]}
		]
	},
	{
		"group": "v5.0   PUBCOMP ALLOWED PROPERTIES",
		"tests": [
			{ "name": "70 with reason-string property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 08 0001 00 04 1F000170"}]},
			{ "name": "70 with 2*reason-string property", "ver":5, "msgs": [
				{"type":"send", "payload":"70 0C 0001 00 08 1F0001701 F000171"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with reason-string property missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 1F"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 0B 0001 00 07 26000170000171"}]},
			{ "name": "70 with 2*user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 12 0001 00 0E 26000170000171 26000170000171"}]},
			{ "name": "70 with user-property missing value", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 23000170"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with user-property missing key,value", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 23"},
				{"type":"recv", "payload":"E0 01 81"}
			]}
		]
	},
	{
		"group": "v5.0   PUBCOMP DISALLOWED PROPERTIES",
		"tests": [
			{ "name": "70 with payload-format-indicator (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0100"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with request-problem-information (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1700"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with maximum-qos (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2400"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with retain-available (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2500"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with wildcard-subscription-available (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2800"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with subscription-identifier-available (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2900"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with shared-subscription-available (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2A00"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with payload-format-indicator (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with request-problem-information (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 17"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with maximum-qos (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 24"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with retain-available (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 25"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with wildcard-subscription-available (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 28"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with subscription-identifier-available (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 29"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with shared-subscription-available (byte) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 2A"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with message-expiry-interval (four byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 0200000001"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with session-expiry-interval (four byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 1100000001"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with will-delay-interval (four byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 1800000001"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with maximum-packet-size (four byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 2700000001"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with message-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 02"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with session-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 11"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with will-delay-interval (four byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 18"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with maximum-packet-size (four byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 27"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with content-type (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 03000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with response-topic (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 08000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with assigned-client-identifier (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 12000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with authentication-method (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 15000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with response-information (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 1A000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with server-reference (UTF-8 string)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 1C000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with content-type (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 03"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with response-topic (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 08"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with assigned-client-identifier (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 12"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with authentication-method (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 15"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with response-information (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 1A"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with server-reference (UTF-8 string) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 1C"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with correlation-data (binary data)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 09000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with authentication-data (binary data)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 16000170"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with correlation-data (binary data) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 0109"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with authentication-data (binary data) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 0116"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with subscription-identifier (variable byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0B01"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with subscription-identifier (variable byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 0B"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with server-keep-alive (two byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 130101"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with receive-maximum (two byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 210101"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with topic-alias-maximum (two byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 220101"},
				{"type":"recv", "payload":"E0 01 82"}
			]},
			{ "name": "70 with topic-alias (two byte integer)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 230101"},
				{"type":"recv", "payload":"E0 01 82"}
			]},

			{ "name": "70 with server-keep-alive (two byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 13"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with receive-maximum (two byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 21"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with topic-alias-maximum (two byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 22"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with topic-alias (two byte integer) missing", "ver":5, "msgs": [
				{"type":"send", "payload":"70 05 0001 00 01 23"},
				{"type":"recv", "payload":"E0 01 81"}
			]},

			{ "name": "70 with invalid-property 0x00 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x04 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0401"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x05 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0501"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x06 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0601"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x07 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0701"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x0A (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0A01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x0C (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0C01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x0D (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0D01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x0E (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0E01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x0F (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 0F01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x10 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x14 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1401"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x1B (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1B01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x1D (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1D01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x1E (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 1E01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x20 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 2001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x7F (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 06 0001 00 02 7F01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with invalid-property 0x8000 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 800001"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x8001 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 800101"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0xFF7F (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 07 0001 00 03 FF7F01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x808001 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 80800101"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0xFFFF7F (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 08 0001 00 04 FFFF7F01"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0x80808001 (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 8080800101"},
				{"type":"recv", "payload":"E0 01 81"}
			]},
			{ "name": "70 with unknown-property 0xFFFFFF7F (byte)", "ver":5, "msgs": [
				{"type":"send", "payload":"70 09 0001 00 05 FFFFFF7F01"},
				{"type":"recv", "payload":"E0 01 81"}
			]}
		]
	}
]
