DiskStoreMonitor { LogUsage getLogDisk() { return logDisk; } DiskStoreMonitor(File logFile); static void checkWarning(float val); static void checkCritical(float val); void addDiskStore(DiskStoreImpl ds); void removeDiskStore(DiskStoreImpl ds); boolean isNormal(DiskStoreImpl ds, DirectoryHolder dir); void close();  }
@Test public void usesCurrentDirWhenLogFileIsNull() { DiskStoreMonitor diskStoreMonitor = new DiskStoreMonitor(null); assertThat(diskStoreMonitor.getLogDisk().dir()).isEqualTo(new File(".")); }
@Test public void usesLogFileParentDir() { DiskStoreMonitor diskStoreMonitor = new DiskStoreMonitor(new File("parent", "child")); assertThat(diskStoreMonitor.getLogDisk().dir()).isEqualTo(new File("parent")); }
@Test public void usesCurrentDirWhenLogFileParentIsNull() { DiskStoreMonitor diskStoreMonitor = new DiskStoreMonitor(new File("child")); assertThat(diskStoreMonitor.getLogDisk().dir()).isEqualTo(new File(".")); }