[TASK] Refactor trustline test code

Refactor trustline test code to reduce duplication and check response body before status code and headers
Same as `checkGetRequest`, rename parameters. `postData` can be `data`