amazon-pay-api-sdk-java
amazon-pay-api-sdk-java copied to clipboard
GenerateButtonSignatureTest.testButtonSignatureWithJSONObject is a flaky buttom
Issue #, if available: The testButtonSignatureWithJSONObject() test can not pass the nondex(https://github.com/TestingResearchIllinois/NonDex) check. The problem is the data inside the JSON variable is non-deterministic and can't guarentee the consistance of output string.
Description of changes: I assertequal the JSONObject instead of String. I use the String is given in testButtonSignatureWithString function to build a JSON object. And using JSONObject.similar(JSONObject) to check the payload
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.