public void SetImmutableIdempotent()
        {
            var headerAccessor = new NativeMessageHeaderAccessor();

            headerAccessor.AddNativeHeader("foo", "bar");
            headerAccessor.SetImmutable();
            headerAccessor.SetImmutable();
        }
        public void AddNativeHeaderImmutable()
        {
            var headerAccessor = new NativeMessageHeaderAccessor();

            headerAccessor.AddNativeHeader("foo", "bar");
            headerAccessor.SetImmutable();
            var ex = Assert.Throws <InvalidOperationException>(() => headerAccessor.AddNativeHeader("foo", "baz"));

            Assert.Contains("Already immutable", ex.Message);
        }