### Question:
ExceptionUtils { public static IOException toIOException(Throwable cause) { if (cause instanceof IOException) { return (IOException) cause; } else if (cause instanceof ExecutionException || cause instanceof CompletionException) { return toIOException(cause.getCause()); } else { return new IOException(cause); } } private  ExceptionUtils(); static CompletableFuture<T> callAndHandleClosedAsync(String componentName,
                                                                    boolean isClosed,
                                                                    CompletableRunnable<T> callable); static IOException toIOException(Throwable cause);  }### Answer:
@Test public void testToIOException() { IOException ioe = new IOException("Test-IOE"); assertTrue(ioe == toIOException(ioe)); Exception se = new Exception("Test-DLSE"); IOException ioe2 = toIOException(se); assertEquals("java.lang.Exception: Test-DLSE", ioe2.getMessage()); assertTrue(se == ioe2.getCause()); ExecutionException ee = new ExecutionException(ioe); assertTrue(ioe == toIOException(ee)); CompletionException ce = new CompletionException(ioe); assertTrue(ioe == toIOException(ce)); }