Reduce boilerplate in tests