refactoring test of legal design