title: Are there any Fake File System frameworks for Java?
body: <p>I am introducing tests in a project that makes heavy use of IO operations (the file system, in this case). The system constantly opens/closes files, checks if files exist, deletes them, etcetera.</p>
  
  <p>It soon became obvious that regular mocking wouldn't be of much use, as that would make my tests hard to set up and reason about. On the other hand, having a fake file system would be awesome, and I think, pretty easy to set up.</p>
  
  <p>It seems the ruby guys did it again, and there's exactly what I am asking for in ruby: <a href="http://ozmm.org/posts/fakefs.html" rel="noreferrer">http://ozmm.org/posts/fakefs.html</a>.</p>
  
  <p>Is there anything remotely similar for Java?</p>