static CompletableFuture<DLOutputStream> openWriterAsync(DistributedLogManager distributedLogManager) {
        log.info("Open a dlog manager");
        return distributedLogManager.openAsyncLogWriter().thenApply(w -> new DLOutputStream(distributedLogManager, w));
    }
@Test
    public void openAsyncLogWriterFailed() {
        when(dlm.openAsyncLogWriter()).thenReturn(failedFuture(new Exception("Open writer was failed")));

        try {
            DLOutputStream.openWriterAsync(dlm).get();
        } catch (Exception e) {
            assertEquals(e.getCause().getMessage(), "Open writer was failed");
        }
    }