public void CanItemHeaderGetItemBufferWithRawHeaderData(SecsFormat expectedSecsFormat, int expectedItemLength, byte expectedNumberOfLengthBytes, byte expectedRawHeaderDataSize)
        {
            ItemHeader itemHeader = new ItemHeader(expectedSecsFormat, expectedItemLength);

            byte[] expectedItemBufferWithRawHeaderData = new byte[expectedRawHeaderDataSize + expectedItemLength];
            expectedItemBufferWithRawHeaderData[0] = (byte)((int)expectedSecsFormat | expectedNumberOfLengthBytes);

            switch (expectedNumberOfLengthBytes)
            {
            case 1:
                expectedItemBufferWithRawHeaderData[1] = (byte)expectedItemLength;
                break;

            case 2:
                expectedItemBufferWithRawHeaderData[1] = (byte)(expectedItemLength >> 8);
                expectedItemBufferWithRawHeaderData[2] = (byte)expectedItemLength;
                break;

            case 3:
                expectedItemBufferWithRawHeaderData[1] = (byte)(expectedItemLength >> 16);
                expectedItemBufferWithRawHeaderData[2] = (byte)(expectedItemLength >> 8);
                expectedItemBufferWithRawHeaderData[3] = (byte)expectedItemLength;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(expectedNumberOfLengthBytes), expectedNumberOfLengthBytes, "The argument must be 1, 2 or 3.");
            }

            var(actualItemBufferWithRawHeaderData, actualOffset) = itemHeader.GetItemBufferWithRawHeaderData();

            Assert.AreEqual(expectedRawHeaderDataSize, actualOffset, nameof(actualOffset));

            CollectionAssert.AreEqual(expectedItemBufferWithRawHeaderData, actualItemBufferWithRawHeaderData);
        }