Add test cases for #setRule() method. Issue #4.