Refactoring of tests

- Reduce the repetition of these tests so that they're easier to read
- Do equality checks on whole data structures instead of specific keys
- Don't to existence checks like `(is some-var)` as later equality checks covered them