Skip to content

Commit

Permalink
Fix flaky test UtilTest.testEnhanceResponseWithShippingAddressList
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujishark committed Nov 13, 2023
1 parent 3ff564e commit ff493ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tst/com/amazon/pay/api/UtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ public void testEnhanceResponseWithShippingAddressList() throws AmazonPayClientE
expectedCheckoutSessionResponse.setResponse(expectedShippingAddressListResponse);
expectedCheckoutSessionResponse.setRawResponse(expectedShippingAddressListResponse.toString());

Assert.assertEquals(expectedCheckoutSessionResponse.getRawResponse(), actualCheckoutSessionResponseAfterEnhancing.getRawResponse());
JSONObject expected = new JSONObject(expectedCheckoutSessionResponse.getRawResponse());
JSONObject actual = new JSONObject(actualCheckoutSessionResponseAfterEnhancing.getRawResponse());
Assert.assertTrue(expected.similar(actual));
}

@Test
Expand Down

0 comments on commit ff493ba

Please sign in to comment.