title: Can you unit test s3 writes?
body: <p>Unit testing a method that verifies a particular s3 bucket exists is simple because the unit test would not change the state of s3. However, unit testing a method that writes to an s3 bucket is more problematic because it actually changes the state of s3 every time the unit test is run. For example, a method that uses <code>rdd.saveAsTextFile(path)</code>.</p>
  
  <p>Can a unit test be written for a method that writes to s3 that still allows you to verify that the file got written?</p>
  
  <p>Note: I thought about using a mock object, but wasn't sure how this might be implemented.</p>
  
  <p>Edit: I should probably note that I am using Scala</p>