### Question:
LedgerDirsManager { public List<File> getWritableLedgerDirs() throws NoWritableLedgerDirException { if (writableLedgerDirectories.isEmpty()) { String errMsg = "All ledger directories are non writable"; NoWritableLedgerDirException e = new NoWritableLedgerDirException( errMsg); throw e; } return writableLedgerDirectories; } LedgerDirsManager(ServerConfiguration conf, File[] dirs, DiskChecker diskChecker);  LedgerDirsManager(ServerConfiguration conf, File[] dirs, DiskChecker diskChecker, StatsLogger statsLogger); List<File> getAllLedgerDirs(); List<LedgerDirsListener> getListeners(); long getTotalFreeSpace(List<File> dirs); long getTotalDiskSpace(List<File> dirs); ConcurrentMap<File, Float> getDiskUsages(); List<File> getWritableLedgerDirs(); boolean hasWritableLedgerDirs(); List<File> getWritableLedgerDirsForNewLog(); List<File> getFullFilledLedgerDirs(); boolean isDirFull(File dir); @VisibleForTesting void addToFilledDirs(File dir); void addToWritableDirs(File dir, boolean underWarnThreshold); void addLedgerDirsListener(LedgerDirsListener listener); DiskChecker getDiskChecker();  }### Answer:
@Test public void testGetWritableDir() throws Exception { try { List<File> writeDirs = dirsManager.getWritableLedgerDirs(); assertTrue("Must have a writable ledgerDir", writeDirs.size() > 0); } catch (NoWritableLedgerDirException nwlde) { fail("We should have a writable ledgerDir"); } }