Added rule test cases
Improved unit-tests