public void WatchdogScheduledItem_SerializationTest()
        {
            // Serialize to the output buffer as binary.
            OutputBuffer output = new OutputBuffer();
            CompactBinaryWriter <OutputBuffer> writer = new CompactBinaryWriter <OutputBuffer>(output);

            Serialize.To(writer, hcs);

            // De-serialize from the binary output.
            InputBuffer input = new InputBuffer(output.Data);
            CompactBinaryReader <InputBuffer> reader = new CompactBinaryReader <InputBuffer>(input);
            WatchdogScheduledItem             hcs1   = Deserialize <WatchdogScheduledItem> .From(reader);

            Assert.IsTrue(hcs.Equals(hcs1));

            // Using the generic BondCustomSerializer.
            using (MemoryStream ms = new MemoryStream())
            {
                using (BinaryWriter bw = new BinaryWriter(ms))
                {
                    BondCustomSerializer <WatchdogScheduledItem> bcs = new BondCustomSerializer <WatchdogScheduledItem>();
                    bcs.Write(hcs, bw);

                    ms.Position = 0L;

                    using (BinaryReader br = new BinaryReader(ms))
                    {
                        hcs1 = bcs.Read(br);
                        Assert.IsTrue(hcs.Equals(hcs1));
                    }
                }
            }
        }