Java : How can I test save method?
<p>I have a following save method, but I dont know how to verify that the method is working correctly. How can I verify it in Test Class ??</p>

<pre><code> static void saveFile(List&lt;String&gt; contents, String path){

   File file = new File(path);
   PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file)));

   for(String data : contents){
      pw.println(data);
   }
 }
</code></pre>

<p>Sorry, contents is not String, but List. But is there no need to make test class ?? because it is constructed by tested java method.</p>