@@ -149,7 +149,9 @@ public void testDownloadObject() throws Exception {
149149 storage .createFrom (info (objectName ), file1 .getPath (), BlobWriteOption .doesNotExist ());
150150 DownloadObject .downloadObject (
151151 GOOGLE_CLOUD_PROJECT , bucket .getName (), objectName , file1 .getPath ().toString ());
152- assertArrayEquals (Files .readAllBytes (file1 .getPath ()), storage .get (bucket .getName (), objectName ).getContent ());
152+ byte [] expected = Files .readAllBytes (file1 .getPath ());
153+ byte [] actual = storage .readAllBytes (bucket .getName (), objectName );
154+ assertArrayEquals (expected , actual );
153155 }
154156 }
155157
@@ -288,7 +290,9 @@ public void testUploadObject() throws IOException {
288290 String objectName = generator .randomObjectName ();
289291 UploadObject .uploadObject (
290292 GOOGLE_CLOUD_PROJECT , bucket .getName (), objectName , file1 .getPath ().toString ());
291- assertArrayEquals (Files .readAllBytes (file1 .getPath ()), storage .get (bucket .getName (), objectName ).getContent ());
293+ byte [] expected = Files .readAllBytes (file1 .getPath ());
294+ byte [] actual = storage .readAllBytes (bucket .getName (), objectName );
295+ assertArrayEquals (expected , actual );
292296 }
293297 }
294298
0 commit comments