public Message ProvideFault(Exception exception, MessageVersion messageVersion)
        {
            var fault = new TestFault
            {
                Message            = exception.Message,
                AdditionalProperty = "foo:bar"
            };

            var faultException = new FaultException <TestFault>(fault, new FaultReason(exception.Message), new FaultCode(nameof(TestFault)), nameof(TestFault));

            var messageFault = faultException.CreateMessageFault();
            var bodyWriter   = new MessageFaultBodyWriter(messageFault, messageVersion);
            var faultMessage = Message.CreateMessage(messageVersion, null, bodyWriter);

            return(faultMessage);
        }
        public Message ProvideFault(Exception exception, MessageVersion messageVersion, Message requestMessage, XmlNamespaceManager xmlNamespaceManager)
        {
            var fault = new TestFault
            {
                Message            = exception.Message,
                AdditionalProperty = "foo:bar"
            };

            var faultException = new FaultException <TestFault>(fault, new FaultReason(exception.Message), new FaultCode(nameof(TestFault)), nameof(TestFault));

            var messageFault = faultException.CreateMessageFault();
            var bodyWriter   = new MessageFaultBodyWriter(messageFault, messageVersion);
            var faultMessage = Message.CreateMessage(messageVersion, null, bodyWriter);

            faultMessage.Properties.Add(HttpResponseMessageProperty.Name, new HttpResponseMessageProperty {
                StatusCode = HttpStatusCode.OK, StatusDescription = "test description"
            });

            return(faultMessage);
        }