public void Utf8KeyFormatter_Should_Throw_When_Input_Is_Empty()
        {
            var transformer = new Utf8KeyFormatter();

            Assert.Throws <ArgumentNullException>(() => transformer.Serialize(new SequenceBuilder(MemoryPool <byte> .Shared), null));
            Assert.Throws <ArgumentException>(() => transformer.Serialize(new SequenceBuilder(MemoryPool <byte> .Shared), ""));
        }
        public void KeyFormatterTests(string input)
        {
            var transformer = new Utf8KeyFormatter();

            using var builder = new SequenceBuilder(MemoryPool <byte> .Shared);
            transformer.Serialize(builder, input);

            var expected = new UTF8Encoding(false).GetBytes(input);

            Assert.Equal(expected, builder.Commit().ToArray());
        }