private void assertLengthField(ConcreteMessage msg, int... expected) {
		byte[] bytes = msg.toBytes();
		assertEquals("Length header has wrong size", expected.length, bytes.length - 1);
		for(int i = 0; i < expected.length; i++) {
			byte exp = (byte) expected[i];
			assertEquals("Mismatch in length field on index " + i, exp, bytes[i+1]);
		}
	}