Fixes in checking hard limit, test cases added.

Fixes in checking hard limit, few test cases added for some entity
classes as well