using System.Text;
using NATS.Server.Routes;

namespace NATS.Server.Clustering.Tests;

public class RouteCompressionTests
{
    [Fact]
    public void Route_payload_round_trips_through_compression_codec()
    {
        var payload = Encoding.UTF8.GetBytes(new string('x', 512));
        var compressed = RouteCompressionCodec.Compress(payload);
        var restored = RouteCompressionCodec.Decompress(compressed);
        restored.ShouldBe(payload);
    }
}
