Level 13
You could create a simple file object, yes. But IMO you don't need it. The upload() method call is from a class you don't own, right? You should never test classes you don't own, so the simplest way is to mock that class and check if the upload method has been called once.