jenkinsci/jenkins — pull request #294 by stephenc (2011-10-19 15:39:05+00:00)
Title: Add a JUnit 4.10+ style Test Rule that can be used to fire up test instances of Jenkins from your very own

This enables use as both @Rule and @ClassRule

@ClassRule will give a single instance that is shared by all the test cases in the test class, while @Rule will give a clean instance for each test. When using @Rule, you can annotate test methods that don't need a Jenkins with @WithoutJenkins