add a unit test for range constraints. Refs #797