public void Connect_CorrectServerDetails_LPC() { // Arrange. var mock = new Mock <IMFilesServerApplication>(); mock.Setup(a => a.ConnectEx4(It.IsAny <TimeZoneInformation>(), It.IsAny <MFAuthType>(), It.IsAny <object>(), It.IsAny <object>(), It.IsAny <object>(), It.IsAny <object>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <bool>(), It.IsAny <string>(), It.IsAny <bool>(), It.IsAny <bool>(), It.IsAny <string>(), It.IsAny <string>())) .Callback((TimeZoneInformation timeZoneInformation, MFAuthType authType, object username, object password, object domain, object spn, string protocolSequence, string networkAddress, string endPoint, bool encryptedConnection, string localComputerName, bool allowAnonymousConnection, bool allowAuthenticationUsingPlugins, string logicalTargetServer, string clientCulture) => { // Assert.; Assert.AreEqual("ncalrpc", protocolSequence); }); var connectionDetails = this.CreateConnectionDetails(); connectionDetails.ServerDetails = ServerDetails.CreateForLpc(); // Act. mock.Object.Connect(connectionDetails); }