[refac] extract tests