public FileIO getFileIO(StorageType.Type storageType) throws IllegalArgumentException {
    Supplier<? extends RuntimeException> exceptionSupplier =
        () -> new IllegalArgumentException(storageType.getValue() + " is not configured");
    if (HDFS.equals(storageType)) {
      return Optional.ofNullable(hdfsFileIO).orElseThrow(exceptionSupplier);
    } else if (LOCAL.equals(storageType)) {
      return Optional.ofNullable(localFileIO).orElseThrow(exceptionSupplier);
    } else if (S3.equals(storageType)) {
      return Optional.ofNullable(s3FileIO).orElseThrow(exceptionSupplier);
    } else if (ADLS.equals(storageType)) {
      return Optional.ofNullable(adlsFileIO).orElseThrow(exceptionSupplier);
    } else {
      throw new IllegalArgumentException("FileIO not supported for storage type: " + storageType);
    }
  }
@Test
  public void testGetUndefinedFileIOThrowsException() {
    // hdfs storage is not configured
    Assertions.assertThrows(
        IllegalArgumentException.class, () -> fileIOManager.getFileIO(StorageType.HDFS));
  }