Added method for mocking a rule to unit test base.