refact some tests