title: How to unit test methods that create and read files
body: <p>I have implemented two static <code>void</code> methods which create files and read files.
  And I want to test the methods but I don't know how to test methods which work with files.
  What is the best way to do that?</p>
  
  <p>I'm using Java and JUnit.</p>