public static void addTransferRateMetric(final DataNodeMetrics metrics, final long read,
      final long durationInNS) {
    metrics.addReadTransferRate(getTransferRateInBytesPerSecond(read, durationInNS));
  }
@Test
  public void testAddTransferRateMetricForZeroNSTransferDuration() {
    DataNodeMetrics mockMetrics = mock(DataNodeMetrics.class);
    DFSUtil.addTransferRateMetric(mockMetrics, 1L, 0);
    verify(mockMetrics).addReadTransferRate(999_999_999L);
  }