Shouldn't this also be testing if the file write was called with the correct arguments?