Reduce repetition in tests.