public void SignatureRequired_OnValidResponseMissingReceipt_IsCorrect()
        {
            // arrange
            const string posRefId      = "test";
            const string requestId     = "12";
            const string receiptToSign = "MISSING RECEIPT\n DECLINE AND TRY AGAIN.";

            // act
            var response = new SignatureRequired(posRefId, requestId, receiptToSign);

            // assert
            Assert.Equal(response.GetMerchantReceipt(), receiptToSign);
        }
        public void SignatureRequired_OnValidResponse_ReturnObjects()
        {
            // arrange
            var          secrets = SpiClientTestUtils.SetTestSecrets();
            const string jsonStr = @"{""message"":{""data"":{""merchant_receipt"": ""\nEFTPOS FROM WESTPAC\nVAAS Product 2\n275 Kent St\nSydney 2000\nAustralia\n\n\nMID         02447506\nTSP     100381990116\nTIME 26APR17   11:29\nRRN     170426000358\nTRAN 000358   CREDIT\nAmex               S\nCARD............4477\nAUTH          764167\n\nPURCHASE   AUD100.00\nTIP          AUD5.00\n\nTOTAL      AUD105.00\n\n\n (001) APPROVE WITH\n     SIGNATURE\n\n\n\n\n\n\nSIGN:_______________\n\n\n\n\n\n\n\n"",""pos_ref_id"":""prchs-06-06-2019-11-49-05""},""datetime"": ""2017-04-26T11:30:21.000"",""event"": ""signature_required"",""id"": ""24""}}";

            // act
            var msg      = Message.FromJson(jsonStr, secrets);
            var response = new SignatureRequired(msg);

            // assert
            Assert.Equal("signature_required", msg.EventName);
            Assert.Equal("24", response.RequestId);
            Assert.Equal("prchs-06-06-2019-11-49-05", response.PosRefId);
            Assert.NotNull(response.GetMerchantReceipt());
        }