@Test
public void size_whenObjectIsGzipEncoded_shouldBeSetToMaxLongValue() throws IOException {

  MockHttpTransport transport =
      mockTransport(
          jsonDataResponse(
              newStorageObject(BUCKET_NAME, OBJECT_NAME).setContentEncoding("gzip")));
  Storage storage = new Storage(transport, JSON_FACTORY, r -> {});
  GoogleCloudStorageReadChannel readChannel =
      createReadChannel(storage, GoogleCloudStorageReadOptions.DEFAULT);
  assertThat(readChannel.size()).isEqualTo(Long.MAX_VALUE);
}