easymock/easymock — pull request #2 by Todderz (2013-10-05 10:37:52+00:00)
Title: JUnit Rule to process mocking annotations as per EasyMockRunner JUnit Runner

Added EasyMockRule, a simple JUnit Rule that re-uses the JUnit Statement from EasyMockRunner. Extracted the statement to a top-level class org.easymock.internal.EasyMockStatement because it can be used by both the Rule and the Runner.

Unit tests are also the same for the Rule as for the Runner: All that changes is the use of Runner or Rule. Therefore extracted the actual tests into a base class with specializations to execute them with the Rule or the Runner, instead of duplicating all the tests for the injection logic etc.