Skip to content

Illegal JSON on retrieveMissingBillPayment() from BillPayment integration tests #26

@cesdias

Description

@cesdias

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:

  1. Insert on the line 224 of the file BillPaymentTest.java the following line of code:
System.out.println(clientCorrelationId);

Run the test:

  1. Run the integration test retrieveMissingBillPayment()
  2. You will see the clientCorrelationId printed on the console. e.g. 80f5404b-0713-42f3-ae66-216ad3d69c0d
  3. The exception com.google.gson.JsonSyntaxException is thrown on the line 226

Testing against MMAPI Simulator:

  1. 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'
  1. 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.

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions