static SeekableInputStream wrap(FSDataInputStream stream) {
    return new HadoopSeekableInputStream(stream);
  }
@Test
  void closeShouldThrowIOExceptionWhenInterrupted() throws Exception {

    S3ABlockOutputStream s3ABlockOutputStream = new S3ABlockOutputStream();
    FSDataOutputStream fsDataOutputStream = new FSDataOutputStream(s3ABlockOutputStream, null);
    PositionOutputStream wrap = HadoopStreams.wrap(fsDataOutputStream);
    // interrupt mock upload on close after a delay
    Executors.newSingleThreadExecutor()
        .execute(
            () -> {
              try {
                Thread.sleep(1000);
              } catch (InterruptedException e) {
                throw new RuntimeException(e);
              }
              s3ABlockOutputStream.interruptClose();
            });

    assertThatThrownBy(wrap::close)
        .isInstanceOf(IOException.class)
        .hasMessage("S3ABlockOutputStream failed to upload object after stream was closed");
  }