I created a Junit jenkins test case where a in-memory jenkins instance is launched (as we use @Rule jenkinsrule). The code of the test case is available here. The test case