terminato refactoring test quadrilateral