public void testDirectUploadServerErrorWithBackOffDisabled() throws Exception {
int contentLength = MediaHttpUploader.DEFAULT_CHUNK_SIZE * 2;
MediaTransport fakeTransport = new MediaTransport(contentLength);
fakeTransport.testServerError = true;
fakeTransport.directUploadEnabled = true;
ByteArrayContent mediaContent =
new ByteArrayContent(TEST_CONTENT_TYPE, new byte[contentLength]);
MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null);
uploader.setDirectUploadEnabled(true);
uploader.upload(new GenericUrl(TEST_DIRECT_REQUEST_URL));
// should be 1 call made: 1 upload request with server error