Made test methods more generic