I use a third-party library that works with java.io.File instances. I would like to use this library in my unit tests, but I do not want it to create files on disk.
My first idea was to use JimFs to mock the file system, but it does not support java.io.File.
My second idea was to mock the File with some mocking structure and delegate JimFs calls, but I don't know if this will work.
Is there any solution for using virtual java.io.File?
source share