Remove the stupid FSS and the mockFor. It creates too many problem from the testing point of view. Instead replace the implementations of required file methods with the help of metaClass in tests