Remove repetition from testing