Functional Test Source Set fix for Idea

Basically a revert of with a few minor tweaks :
f41eb91d37f9a3fb709ede525db3744ec1449d70