LedgerHandleCache { public static Builder newBuilder() { return new Builder(); } private  LedgerHandleCache(BookKeeperClient bkc, String digestpw, StatsLogger statsLogger); static Builder newBuilder(); Future<LedgerDescriptor> asyncOpenLedger(LogSegmentMetadata metadata, boolean fence); LedgerDescriptor openLedger(LogSegmentMetadata metadata, boolean fence); Future<Void> asyncCloseLedger(LedgerDescriptor ledgerDesc); void closeLedger(LedgerDescriptor ledgerDesc); long getLastAddConfirmed(LedgerDescriptor ledgerDesc); boolean isLedgerHandleClosed(LedgerDescriptor ledgerDesc); Future<Long> asyncTryReadLastConfirmed(LedgerDescriptor ledgerDesc); long tryReadLastConfirmed(LedgerDescriptor ledgerDesc); Future<Pair<Long, LedgerEntry>> asyncReadLastConfirmedAndEntry(
            LedgerDescriptor ledgerDesc,
            long entryId,
            long timeOutInMillis,
            boolean parallel); Future<Enumeration<LedgerEntry>> asyncReadEntries(
            LedgerDescriptor ledgerDesc, long first, long last); Enumeration<LedgerEntry> readEntries(LedgerDescriptor ledgerDesc, long first, long last); long getLength(LedgerDescriptor ledgerDesc); void clear();  }
@Test(timeout = 60000, expected = NullPointerException.class) public void testBuilderWithoutBKC() throws Exception { LedgerHandleCache.newBuilder().build(); }
@Test(timeout = 60000, expected = NullPointerException.class) public void testBuilderWithoutStatsLogger() throws Exception { LedgerHandleCache.newBuilder().bkc(bkc).conf(conf).statsLogger(null).build(); }