[JENKINS-21816] Added tests for rebuild-plugin support.