XenonConfiguration { public static <T extends Enum<T>> T choice(Class<?> subsystem, String property, Class<T> enumType, T defaultValue) { return INSTANCE.getChoice(subsystem, property, enumType, defaultValue); } XenonConfiguration(ConfigurationSource source); static double decimal(Class<?> subsystem, String property, double defaultValue); static long number(Class<?> subsystem, String property, long defaultValue); static int integer(Class<?> subsystem, String property, long defaultValue); static long duration(Class<?> subsystem, String property, Duration defaultValue); static long duration(Class<?> subsystem, String property, TimeUnit unit, long duration); static String string(Class<?> subsystem, String property, String defaultValue); static T choice(Class<?> subsystem, String property, Class<T> enumType,
            T defaultValue); static String secret(Class<?> subsystem, String property, String defaultValue); static boolean bool(String subsystem, String property, boolean defaultValue); static boolean bool(Class<?> subsystem, String property, boolean defaultValue);  }
@Test public void choice() throws Exception { prepareConfig(RoundingMode.CEILING.toString()); assertEquals(RoundingMode.CEILING, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.HALF_UP)); assertEquals(RoundingMode.FLOOR, this.config .getChoice(XenonConfigurationTest.class, this.undefined, RoundingMode.class, RoundingMode.FLOOR)); prepareConfig("random junk"); assertEquals(RoundingMode.UP, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.UP)); }