public async Task TestPacketWriteFloat()
        {
            const int size = sizeof(float);

            var packet = new MutablePacket();
            packet.WriteFloat(2.0f);
            var bytes = packet.Lock();
            Assert.IsTrue(bytes.Length >= size, "Failed to write float to packet");
            if (packet.Locked)
            {
                var task = new Task(() => packet.WriteFloat(-1930.2423f));
                task.Start();
                Assert.IsTrue(await TaskTimesOut(TimeSpan.FromSeconds(2), task), "Packet reported being locked after locking but was still mutable");
            }

            else
            {
                bytes[0] = 11;
                var newBytes = packet.Lock();
                if (bytes[0] != newBytes[0])
                    Assert.Fail("Packet reported not being locked but the buffer was returned by reference not copy. Return a full copy of the buffer if you wish to unlock else ensure you set the buffer to a locked state when Lock() is called.");
            }
        }