Poniższy test napisany w nUnit (C#) zwraca poniższy błąd. Popraw implementację, aby test wykonywał się prawidłowo.

/// TEST     

[Test]
    public async Task PrintSaleConfirmationAsync_ValidInput_SuccessfulPrint()
    {
        // Arrange
        var response = new FirstDataStartResponse
        {
            AcceptorTransactionIdentifier = "123456",
            TransactionNumber = 1,
            TID = "TID001",
            MID = "MID001",
            CardAcceptorName = "Test Merchant",
            MaskedCardNumber = "************1234",
            CardName = "VISA",
            TransactionCurrencyCode = "PLN",
            TransactionAmount = 100.00m,
            MaskedExpiryDateOfCard = "12/24",
            UnmaskedExpiryDateOfCard = "12/24"
        };
        string ip = "192.168.1.1";
        int port = 9100;

        var mockFiscalPrinterService = new Mock<FiscalPrinterService>();
        mockFiscalPrinterService.Setup(x => x.SendCommandToFiscalPrinter(It.IsAny<string[]>(), ip, port))
            .ReturnsAsync(string.Empty); // Simulate successful command execution

        // Act
        await mockFiscalPrinterService.Object.PrintSaleConfirmationAsync(response, ip, port);

        // Assert
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formstart"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl1"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl2"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl4"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl6"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl8"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl9"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl31"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl35"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formline" && a[2] == "fl70"), ip, port), Times.Once);
        mockFiscalPrinterService.Verify(x => x.SendCommandToFiscalPrinter(It.Is<string[]>(a => a[0] == "formend"), ip, port), Times.Once);
    }

/// KOD

    public async Task<string> SendCommandToFiscalPrinter(string[] commands, string ip, int port)
    {
        Logger.Debug("Sending command to fiscal printer.");

        if (string.IsNullOrEmpty(ip))
        {
            throw new InvalidOperationException("The fiscal printer host is not configured. Please set the host before sending commands.");
        }

        using var client = new TcpClient();
        await client.ConnectAsync(ip, port);
        using NetworkStream stream = client.GetStream();

        var fullCommand = FullCommandCrced(commands);
        return await SendCommandToStream(fullCommand, stream);
    }

/// BŁĄD

 PrintSaleConfirmationAsync_ValidInput_SuccessfulPrint
   Source: FiscalPrinterServiceTests.cs line 161
   Duration: 2 ms

  Message: 
System.NotSupportedException : Unsupported expression: x => x.SendCommandToFiscalPrinter(It.IsAny<string[]>(), ip, port)
Non-overridable members (here: FiscalPrinterService.SendCommandToFiscalPrinter) may not be used in setup / verification expressions.

  Stack Trace: 
Guard.IsOverridable(MethodInfo method, Expression expression) line 99
ExpressionExtensions.<Split>g__Split|5_0(Expression e, Expression& r, MethodExpectation& p, Boolean assignment, Boolean allowNonOverridableLastProperty) line 219
ExpressionExtensions.Split(LambdaExpression expression, Boolean allowNonOverridableLastProperty) line 149
Mock.SetupRecursive[TSetup](Mock mock, LambdaExpression expression, Func`4 setupLast, Boolean allowNonOverridableLastProperty) line 660
Mock.Setup(Mock mock, LambdaExpression expression, Condition condition) line 515
Mock`1.Setup[TResult](Expression`1 expression) line 452
FiscalPrinterServiceTests.PrintSaleConfirmationAsync_ValidInput_SuccessfulPrint() line 182
GenericAdapter`1.GetResult()
AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
AsyncToSyncAdapter.Await(Func`1 invoke)
TestMethodCommand.RunTestMethod(TestExecutionContext context)
TestMethodCommand.Execute(TestExecutionContext context)
<>c__DisplayClass3_0.<PerformWork>b__0()
<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
ContextUtils.DoIsolated(ContextCallback callback, Object state)
ContextUtils.DoIsolated[T](Func`1 func)
SimpleWorkItem.PerformWork()