Better checking of variants in unit test