PrometheusMetricFactory implements MetricFactory { public static String getProperty(String key, String def) { return System.getProperty(SYSTEM_PROP_PREFIX + key, def); }  @Override Metric create(); static String getProperty(String key, String def); static final String SYSTEM_PROP_PREFIX; static final String ENABLE_PROP; static final String JVM_ENABLE_PROP; static final String HTTP_SERVER_ENABLE_PROP; static final String HTTP_SERVER_PORT_PROP; static final String NAMESPACE_PROP; static final String LABEL_REQUEST_DOMAIN_NAME_ENABLE_PROP; static final String LABEL_PRINCIPAL_DOMAIN_NAME_ENABLE_PROP; static final String LABEL_HTTP_METHOD_NAME_ENABLE_PROP; static final String LABEL_HTTP_STATUS_NAME_ENABLE_PROP; static final String LABEL_API_NAME_ENABLE_PROP; }
@Test public void testGetProperty() { String expected = "false"; setProperty(PrometheusMetricFactory.ENABLE_PROP, expected); String prop = PrometheusMetricFactory.getProperty(PrometheusMetricFactory.ENABLE_PROP, "true"); clearProperty(PrometheusMetricFactory.ENABLE_PROP); Assert.assertEquals(prop, expected); }