[JENKINS-17337] Added test for NPE.
Merge branch 'master' of github.com:jenkinsci/jenkins