@Test
public void testJvmMetricsSingletonWithSameProcessName() {

  JvmMetrics jvmMetrics1 = org.apache.hadoop.metrics2.source.JvmMetrics
      .initSingleton("test", null);
  JvmMetrics jvmMetrics2 = org.apache.hadoop.metrics2.source.JvmMetrics
      .initSingleton("test", null);
  Assert.assertEquals("initSingleton should return the singleton instance",
      jvmMetrics1, jvmMetrics2);
}