[JENKINS-7291] Accidental Java 7 dependency in test.
(cherry picked from commit cedf17e00e1dc60ac4c8f0561e7975b146c9ffd8)