title: When creating transaction with fake-valid-nonce in test, the transaction result shows me the message: "Gateway Rejected: duplicate”
body: <p>There is a problem when I trying to create a transaction with <code>fake-valid-nonce</code> in my test.</p>
  
  <p>Here’s the code about create transaction:</p>
  
  <pre><code>const createTransaction = (price, nonceFromTheClient, customerBrainTreeId) =&gt; {
    const transactionToken = new Promise((resolve, reject) =&gt; {
      gateway.transaction.sale(
        {
          amount: price,
          customerId: customerBrainTreeId,
          paymentMethodNonce: nonceFromTheClient,
          options: {
            submitForSettlement: true
          }
        },
        (error, result) =&gt; {
          if (error) {
            logger.error(`create transaction error: ${error}`);
            reject(error);
          } else {
            resolve(result);
          }
        });
    });
  
    return transactionToken;
  };
  </code></pre>
  
  <p>And here is the code about test:</p>
  
  <pre><code>it(‘**************************', () =&gt; {
    return PaymentService.createTransaction("104.0", 'fake-valid-nonce', null)
      .then(result =&gt; {
        expect(result.success).to.be.true;
        expect(result.transaction.status).to.be.equals('submitted_for_settlement');
        expect(result.transaction.type).to.be.equals('sale');
      });
  });
  </code></pre>
  
  <p>When I run the test for the first time, this test will pass. But, if I run this test multiple times, this test will not pass, and the transaction result shows me the message: <strong>"Gateway Rejected: duplicate”</strong>.</p>
  
  <p>How can I solve this problem?</p>