Add unit test for constraint main builder