private OperationContextProvider GetProvider(IWuRemoteServiceCallback callback, CommunicationState comState)
        {
            var opp = MoqFactory.Create <OperationContextProvider>();

            opp.Setup(o => o.GetCallbackChannel()).Returns(callback);
            opp.Setup(o => o.GetCommunicationState(It.IsAny <IWuRemoteServiceCallback>())).Returns(comState);
            return(opp.Object);
        }
 /// <summary>
 /// Returns the communication state for the given callback. Override to replace the default behavior.
 /// </summary>
 virtual public CommunicationState GetCommunicationState(IWuRemoteServiceCallback callback)
 {
     if (callback == null)
     {
         throw new ArgumentNullException(nameof(callback));
     }
     return(((IServiceChannel)callback).State);
 }