Configuration { public static String valueFor(String key) { Configuration conf = instance(); String val = conf.properties.getProperty(key); if (val == null) { conf.warning("CONFIGURATION: no value found for key " + key); } return val; } private  Configuration(); static void setConfigLogger(Logger logger); static String valueFor(String key); static boolean hasValue(String key); static int valueAsByte(String key, byte defaultVal); static int valueAsShort(String key, short defaultVal); static int valueAsInt(String key, int defaultVal); static long valueAsLong(String key, long defaultVal); static float valueAsFloat(String key, float defaultVal); static double valueAsDouble(String key, double defaultVal); static String valueFor(String key, String defaultVal); static Iterator<String> keysByPrefix(String prefix); static boolean isTrue(String key, boolean defaultVal); static boolean isFalse(String key, boolean defaultVal); static Object valueFromClassConstant(String key, Object defaultValue);  }
@Test public void testValueFor() { String key = "xr.test-config-byte"; String value = Configuration.valueFor(key); assertThat(value, is("8")); }