Refacting of tests