Added test coverage for SPARK-2180.

This is a simple test for HAVING clauses.