Similar test code extracted to abstract class