@Test
public void testRunningState() {

  setStartupProgressForRunningState(startupProgress);
  MetricsRecordBuilder builder = getMetrics(metrics, true);
  assertTrue(getLongCounter("ElapsedTime", builder) >= 0L);
  assertGauge("PercentComplete", 0.375f, builder);
  assertCounter("LoadingFsImageCount", 100L, builder);
  assertTrue(getLongCounter("LoadingFsImageElapsedTime", builder) >= 0L);
  assertCounter("LoadingFsImageTotal", 100L, builder);
  assertGauge("LoadingFsImagePercentComplete", 1.0f, builder);
  assertCounter("LoadingEditsCount", 100L, builder);
  assertTrue(getLongCounter("LoadingEditsElapsedTime", builder) >= 0L);
  assertCounter("LoadingEditsTotal", 200L, builder);
  assertGauge("LoadingEditsPercentComplete", 0.5f, builder);
  assertCounter("SavingCheckpointCount", 0L, builder);
  assertCounter("SavingCheckpointElapsedTime", 0L, builder);
  assertCounter("SavingCheckpointTotal", 0L, builder);
  assertGauge("SavingCheckpointPercentComplete", 0.0f, builder);
  assertCounter("SafeModeCount", 0L, builder);
  assertCounter("SafeModeElapsedTime", 0L, builder);
  assertCounter("SafeModeTotal", 0L, builder);
  assertGauge("SafeModePercentComplete", 0.0f, builder);
}