[JENKINS-11543] Unit test

(cherry picked from commit 75f5d2180f7340ce2efd4f41c8670afb049eb530)
Integrated the new version.

This version includes a change from christ66 in
https://github.com/stapler/stapler/pull/40

(cherry picked from commit 65c2d378814ebd3fe8c43f428a1408dd6354c9bb)

Conflicts:
	core/pom.xml