Simplified unit test.
Refactoring of unit test.
[FIXED JENKINS-17225] Added support for regular expressions as task tags.