ConduitMetrics { public static AbsoluteGauge registerAbsoluteGauge(String serviceName, String counterType, String context) { final String metricName = createName(serviceName, counterType, context); AbsoluteGauge metric = registerAbsoluteGauge(metricName, 0); if (metric != null) { addToCache(serviceName, counterType, context, metric); } return metric; }  static void init(Properties config); static void startAll(); static void stopAll(); static AbsoluteGauge registerAbsoluteGauge(String serviceName,
                                                    String counterType,
                                                    String context); static AbsoluteGauge registerAbsoluteGauge(String name,
      Number initalValue); static void updateAbsoluteGauge(String serviceName,
                                         String counterType,
                                         String context, Number value); @SuppressWarnings("rawtypes") static Gauge registerGauge(String name, Gauge gaugeInst); synchronized static Counter registerCounter(String serviceName,
      String counterType, String context); @SuppressWarnings("unchecked") static T getMetric(String serviceName,
			String counterType, String context); static void incCounter(String serviceName, String counterType,
      String context ,long value); static SlidingTimeWindowGauge registerSlidingWindowGauge(String serviceName,
	      String counterType, String context); static void updateSWGuage(String serviceName, String counterType,
			String context, long value);  }
@Test public void testRegisterAbsoluteGauge() { final String abGaugeName = "test.abs.guage"; AbsoluteGauge abGauge = ConduitMetrics.registerAbsoluteGauge(abGaugeName, 5); Assert.assertNotNull(abGauge); Assert.assertEquals(abGauge.getValue(), 5); abGauge.setValue(2); Assert.assertEquals(abGauge.getValue(), 2); abGauge = ConduitMetrics.registerAbsoluteGauge(abGaugeName, 5); Assert.assertNull(abGauge); }