};
final File file = File.createTempFile("post", ".txt");
new FileWriter(file).append("hello").close();
final AtomicLong tx = new AtomicLong(0);
UploadProgress progress = new UploadProgress() {
public void onUpload(long transferred, long total) {
assertEquals(file.length(), total);
assertEquals(tx.incrementAndGet(), transferred);
}
};