private static void TestSerialization(TimelineCoordinates coordinates)
        {
            var writer = new BinaryBufferWriter(1)
            {
                Endianness = Endianness.Big
            };

            TimelineCoordinatesWriter.Write(coordinates, writer);

            var reader = new BinaryBufferReader(writer.Buffer, 0)
            {
                Endianness = Endianness.Big
            };

            var deserialized = TimelineCoordinatesReader.Read(reader);

            deserialized.Positions.Length.Should().Be(coordinates.Positions.Length);

            for (var i = 0; i < deserialized.Positions.Length; i++)
            {
                deserialized.Positions[i].Slice.Should().Be(coordinates.Positions[i].Slice);
                deserialized.Positions[i].Offset.Should().Be(coordinates.Positions[i].Offset);
                deserialized.Positions[i].EventId.Should().Equal(coordinates.Positions[i].EventId);
            }
        }
        private static ArraySegment <byte> CreateRequestBody([NotNull] TimelineCoordinates coordinates)
        {
            var writer = new BinaryBufferWriter(sizeof(int) + coordinates.Positions.Length * (sizeof(int) + sizeof(long) + 24))
            {
                Endianness = Endianness.Big
            };

            TimelineCoordinatesWriter.Write(coordinates, writer);

            return(writer.FilledSegment);
        }