Slight refactor of tests