Hmm, yes I have custom test tasks/configurations, these extendFrom testCompile but the dependencies are specified as testCompile in my build,gradle. I had to manually add to the testSourcesDir in my code because the sourceSet for these is not test but testUtil or testUnit
I will try and split the code out into a stand along project so I can post here, however the problem I have is anonymising the code to remove anything company specific, the company I am currently working at is quite particular about not being identified.