DefaultDriveProvider implements DriveMetrics { @Override public List<DriveLoad> driveLoads() { return hal.getDiskStores().stream().map(this::createDiskLoad).collect(Collectors.toList()); } protected  DefaultDriveProvider(OperatingSystem operatingSystem, HardwareAbstractionLayer hal, SpeedMeasurementManager speedMeasurementManager); void register(); @Override List<Drive> drives(); @Override List<DriveLoad> driveLoads(); @Override Optional<DriveLoad> driveLoadByName(String name); @Override Optional<Drive> driveByName(String name); DriveHealth diskHealth(String name);  }
@Test public void diskLoadHappyPath() { List<DriveLoad> driveLoads = provider.driveLoads(); assertThat(driveLoads.size(), is(2)); assertThat(driveLoads.get(0).getSpeed().getReadBytesPerSecond(), is(1000L)); }