[TASK] Refactor trustline test code

Refactor trustline test code to reduce duplication and check response body before status code and headers
Rename `bodyExpectFunction`. Effectively you pass in a function that is called in an expect body, so `expectFn` feels like enough, maybe even `expect`.