@Test
public void readFailsWithInvalidMessageChecksum() throws Exception {

  GoogleCloudStorageReadOptions options =
      GoogleCloudStorageReadOptions.builder().setGrpcChecksumsEnabled(true).build();
  GoogleCloudStorageGrpcReadChannel readChannel = newReadChannel(options);
  fakeService.setReturnIncorrectMessageChecksum();
  ByteBuffer buffer = ByteBuffer.allocate(10);
  IOException thrown = assertThrows(IOException.class, () -> readChannel.read(buffer));
  assertTrue(thrown.getMessage().contains("checksum"));
}