Added Mockito tests for the rule