Add unit tests for constraints