DefaultNetworkMetrics implements NetworkMetrics { @Override public List<NetworkInterface> networkInterfaces() { return hal.getNetworkIFs().stream().map(mapToNetworkInterface()).collect(Collectors.toList()); } protected  DefaultNetworkMetrics(HardwareAbstractionLayer hal, SpeedMeasurementManager speedMeasurementManager); @Override List<NetworkInterface> networkInterfaces(); @Override Optional<NetworkInterface> networkInterfaceById(String id); @Override List<NetworkInterfaceLoad> networkInterfaceLoads(); @Override Optional<NetworkInterfaceLoad> networkInterfaceLoadById(String id);  }
@Test public void networkInterfacesHappyPath() { List<NetworkInterface> networkInterfaces = provider.networkInterfaces(); assertThat(networkInterfaces.size(), is(2)); }