Illegal JSON on retrieveMissingBillPayment() from BillPayment integration tests
The test case retrieveMissingBillPayment() from BillPayment integration test is returning a JsonSyntaxException on line 226 of the file BillPaymentTest.java. Although this indicates a malformed JSON on the responses of the Simulator, I could not see any malformed JSON when I make requests directly to the MMAPI Endpoints on the simulator.
Steps to reproduce
For debug purposes:
- Insert on the line 224 of the file BillPaymentTest.java the following line of code:
System.out.println(clientCorrelationId);
Run the test:
- Run the integration test
retrieveMissingBillPayment()
- You will see the
clientCorrelationId printed on the console. e.g. 80f5404b-0713-42f3-ae66-216ad3d69c0d
- The exception
com.google.gson.JsonSyntaxException is thrown on the line 226
Testing against MMAPI Simulator:
- Get the
clientCorrelationId and make the request directly to the MMAPI:
curl --location --request GET 'https://sandbox.mobilemoneyapi.io/simulator/v1.2/passthrough/mm/responses/80f5404b-0713-42f3-ae66-216ad3d69c0d'
- Get the
link from the JSON response and make another request to the MMAPI:
curl --location --request GET 'https://sandbox.mobilemoneyapi.io/simulator/v1.2/passthrough/mm/accounts/msisdn@+449999999/bills
Both JSON returned from steps 4 and 5 are corrected.
Expected outcome
The test case must be able to parse JSON from the steps 4 and 5.
Actual outcome
The exception com.google.gson.JsonSyntaxException is thrown indicating that a JSON is malformed.
Illegal JSON on
retrieveMissingBillPayment()from BillPayment integration testsThe test case
retrieveMissingBillPayment()from BillPayment integration test is returning a JsonSyntaxException on line 226 of the fileBillPaymentTest.java. Although this indicates a malformed JSON on the responses of the Simulator, I could not see any malformed JSON when I make requests directly to the MMAPI Endpoints on the simulator.Steps to reproduce
For debug purposes:
Run the test:
retrieveMissingBillPayment()clientCorrelationIdprinted on the console. e.g.80f5404b-0713-42f3-ae66-216ad3d69c0dcom.google.gson.JsonSyntaxExceptionis thrown on the line 226Testing against MMAPI Simulator:
clientCorrelationIdand make the request directly to the MMAPI:curl --location --request GET 'https://sandbox.mobilemoneyapi.io/simulator/v1.2/passthrough/mm/responses/80f5404b-0713-42f3-ae66-216ad3d69c0d'linkfrom the JSON response and make another request to the MMAPI:curl --location --request GET 'https://sandbox.mobilemoneyapi.io/simulator/v1.2/passthrough/mm/accounts/msisdn@+449999999/billsBoth JSON returned from steps 4 and 5 are corrected.
Expected outcome
The test case must be able to parse JSON from the steps 4 and 5.
Actual outcome
The exception
com.google.gson.JsonSyntaxExceptionis thrown indicating that a JSON is malformed.