Add test coverage for 'addRule' method