[TASK] Refactor trustline test code

Refactor trustline test code to reduce duplication and check response body before status code and headers
It feels inconsistent to be able to pass in a function to check the body for `posts`, but not for `gets`. There's something to see for supporting both testing methods. Passing in a `body` and/or `expectFn` and execute appropriately on either, as long as one of them is present.