Refactory test