Added tests for constraint generation.