GRADLE-3155 Fixed one of the tests that exposed the problem.

It makes more sense to put junit on testCompile classpath anyway.