constrainutil unittest