@@ -102,8 +102,8 @@ public void testWriteWithoutFlush() throws IOException {
102102 public void testWriteWithFlush () throws IOException {
103103 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
104104 Capture <byte []> capturedBuffer = Capture .newInstance ();
105- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
106- eq (BLOB_INFO . toPb ()), eq ( 0L ), eq ( CUSTOM_CHUNK_SIZE ), eq (false ));
105+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq ( 0L ),
106+ eq (CUSTOM_CHUNK_SIZE ), eq (false ));
107107 replay (storageRpcMock );
108108 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
109109 writer .chunkSize (CUSTOM_CHUNK_SIZE );
@@ -116,9 +116,8 @@ public void testWriteWithFlush() throws IOException {
116116 public void testWritesAndFlush () throws IOException {
117117 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
118118 Capture <byte []> capturedBuffer = Capture .newInstance ();
119- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
120- eq (BLOB_INFO .toPb ()), eq (0L ), eq (DEFAULT_CHUNK_SIZE ),
121- eq (false ));
119+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq (0L ),
120+ eq (DEFAULT_CHUNK_SIZE ), eq (false ));
122121 replay (storageRpcMock );
123122 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
124123 ByteBuffer [] buffers = new ByteBuffer [DEFAULT_CHUNK_SIZE / MIN_CHUNK_SIZE ];
@@ -138,8 +137,7 @@ public void testWritesAndFlush() throws IOException {
138137 public void testCloseWithoutFlush () throws IOException {
139138 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
140139 Capture <byte []> capturedBuffer = Capture .newInstance ();
141- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
142- eq (BLOB_INFO .toPb ()), eq (0L ), eq (0 ), eq (true ));
140+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq (0L ), eq (0 ), eq (true ));
143141 replay (storageRpcMock );
144142 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
145143 assertTrue (writer .isOpen ());
@@ -153,8 +151,7 @@ public void testCloseWithFlush() throws IOException {
153151 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
154152 Capture <byte []> capturedBuffer = Capture .newInstance ();
155153 ByteBuffer buffer = randomBuffer (MIN_CHUNK_SIZE );
156- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
157- eq (BLOB_INFO .toPb ()), eq (0L ), eq (MIN_CHUNK_SIZE ),
154+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq (0L ), eq (MIN_CHUNK_SIZE ),
158155 eq (true ));
159156 replay (storageRpcMock );
160157 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
@@ -170,8 +167,7 @@ public void testCloseWithFlush() throws IOException {
170167 public void testWriteClosed () throws IOException {
171168 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
172169 Capture <byte []> capturedBuffer = Capture .newInstance ();
173- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
174- eq (BLOB_INFO .toPb ()), eq (0L ), eq (0 ), eq (true ));
170+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq (0L ), eq (0 ), eq (true ));
175171 replay (storageRpcMock );
176172 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
177173 writer .close ();
@@ -189,8 +185,7 @@ public void testSaveAndRestore() throws IOException {
189185 Capture <byte []> capturedBuffer = Capture .newInstance (CaptureType .ALL );
190186 Capture <Long > capturedPosition = Capture .newInstance (CaptureType .ALL );
191187 storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
192- eq (BLOB_INFO .toPb ()), captureLong (capturedPosition ),
193- eq (DEFAULT_CHUNK_SIZE ), eq (false ));
188+ captureLong (capturedPosition ), eq (DEFAULT_CHUNK_SIZE ), eq (false ));
194189 expectLastCall ().times (2 );
195190 replay (storageRpcMock );
196191 ByteBuffer buffer1 = randomBuffer (DEFAULT_CHUNK_SIZE );
@@ -210,8 +205,7 @@ public void testSaveAndRestore() throws IOException {
210205 public void testSaveAndRestoreClosed () throws IOException {
211206 expect (storageRpcMock .open (BLOB_INFO .toPb (), EMPTY_RPC_OPTIONS )).andReturn (UPLOAD_ID );
212207 Capture <byte []> capturedBuffer = Capture .newInstance ();
213- storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ),
214- eq (BLOB_INFO .toPb ()), eq (0L ), eq (0 ), eq (true ));
208+ storageRpcMock .write (eq (UPLOAD_ID ), capture (capturedBuffer ), eq (0 ), eq (0L ), eq (0 ), eq (true ));
215209 replay (storageRpcMock );
216210 writer = new BlobWriteChannelImpl (options , BLOB_INFO , EMPTY_RPC_OPTIONS );
217211 writer .close ();
0 commit comments