### Question:
DedicatedDiskSpaceUsage extends AbstractSpaceUsageSource { @Override public long getUsedSpace() { return time(this::calculateUsedSpace, LOG); } DedicatedDiskSpaceUsage(File path); @Override long getUsedSpace();  }### Answer:
@Test public void testGetUsed() throws IOException { File file = new File(DIR, "data"); createFile(file, FILE_SIZE); SpaceUsageSource subject = new DedicatedDiskSpaceUsage(DIR); assertTrue(subject.getUsedSpace() >= FILE_SIZE - 20); }