[TASK] Refactor trustline test code

Refactor trustline test code to reduce duplication and check response body before status code and headers
An object with named parameters would be more clear here