public void ReadBytesTest()
        {
            int bufferLength = 10;
            int chunkSize    = 2;

            byte[] input  = new byte[bufferLength];
            byte[] output = new byte[bufferLength];
            byte[] chunk  = new byte[chunkSize];

            for (int index = 0; index < bufferLength; index++)
            {
                input[index]  = (byte)(index + 10);
                output[index] = 0xff;
            }

            WangStream wangStream = new WangStream(input);
            int        read       = 0;

            while (wangStream.AvailableBytes() != 0)
            {
                Assert.IsFalse(wangStream.IsEnd());
                wangStream.ReadBytes(chunk, chunkSize);
                Array.Copy(chunk, 0, output, read, chunkSize);
                read += chunkSize;
            }

            Assert.IsTrue(wangStream.IsEnd());
            Assert.AreEqual(0, wangStream.AvailableBytes());
            Assert.AreEqual(bufferLength, output.Length);
            for (int index = 0; index < bufferLength; index++)
            {
                Assert.AreEqual(input[index], output[index]);
            }
        }