}
public void testResumableMediaUploadWithoutContentClose() throws Exception {
int contentLength = 0;
MediaTransport fakeTransport = new MediaTransport(contentLength);
TestableByteArrayInputStream inputStream =
new TestableByteArrayInputStream(new byte[contentLength]);
InputStreamContent mediaContent = new InputStreamContent(
TEST_CONTENT_TYPE, inputStream).setLength(contentLength).setCloseInputStream(false);
MediaHttpUploader uploader = new MediaHttpUploader(mediaContent, fakeTransport, null);
uploader.upload(new GenericUrl(TEST_RESUMABLE_REQUEST_URL));
assertFalse(inputStream.isClosed());
}