Extracted duplicate updateQuality calls in tests