title: Mock java.io.File with an in-memory FileSystem. Maybe JimFs
body: <p>I'm using a third party library that works with <code>java.io.File</code> instances. I'd like to use this library in my unit tests but I don't want it to create files on disk. </p>
  
  <p>My first idea was to use <a href="https://github.com/google/jimfs" rel="noreferrer">JimFs</a> to mock the file system but it does not support java.io.File. </p>
  
  <p>My second idea was to mock File with some mocking framework and delegate calls to JimFs but don't know if that will work.</p>
  
  <p>Is there some solution out there to use virtual java.io.File?</p>