@VisibleForTesting
    double getTotalNicLimitWithConfiguration(List<String> nics) {
        // Use the override value as configured. Return the total max speed across all available NICs, converted
        // from Gbps into Kbps
        return overrideBrokerNicSpeedGbps.map(BitRateUnit.Gigabit::toKilobit)
                .map(speed -> speed * nics.size())
                .orElseGet(() -> getTotalNicLimit(nics, BitRateUnit.Kilobit));
    }
@Test
    public void checkOverrideBrokerNicSpeedGbps() {
        @Cleanup("shutdown")
        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
        LinuxBrokerHostUsageImpl linuxBrokerHostUsage =
                new LinuxBrokerHostUsageImpl(1, Optional.of(3.0), executorService);
        List<String> nics = new ArrayList<>();
        nics.add("1");
        nics.add("2");
        nics.add("3");
        double totalLimit = linuxBrokerHostUsage.getTotalNicLimitWithConfiguration(nics);
        Assert.assertEquals(totalLimit, 3.0 * 1000 * 1000 * 3);
    }