code: private static String unwrapFutureString(CompletionStage<String> future) throws GetBytesException {
          try {
              return future.toCompletableFuture().get();
          } catch (Throwable e) {
              if (e.getCause() instanceof GetBytesException) {
                  throw (GetBytesException) e.getCause();
              }
              throw new RuntimeException(e.getCause());
          }
      }
docs: Waits for a CompletionStage, for non-async methods.