### Question:
ConfigKey { public double getDouble(Configuration conf) { checkArgument(type() == Type.DOUBLE, "'" + name() + "' is NOT a DOUBLE numeric setting"); return conf.getDouble(name(), (Double) defaultValue()); }  static ConfigKeyBuilder builder(String name); @Override boolean equals(Object o); @Override int hashCode(); void validate(Configuration conf); void set(Configuration conf, Object value); long getLong(Configuration conf); int getInt(Configuration conf); short getShort(Configuration conf); boolean getBoolean(Configuration conf); double getDouble(Configuration conf); String getString(Configuration conf); @SuppressWarnings("unchecked") Class<? extends T> getClass(Configuration conf, Class<T> interfaceCls); @SuppressWarnings("unchecked") Class<?> getClass(Configuration conf); @SuppressWarnings("unchecked") List<Object> getList(Configuration conf); Object get(Configuration conf); static final Comparator<ConfigKey> ORDERING; }### Answer:
@Test public void testGetDouble() { String keyName = runtime.getMethodName(); double defaultValue = ThreadLocalRandom.current().nextDouble(10000.0f); ConfigKey key = ConfigKey.builder(keyName) .required(true) .type(Type.DOUBLE) .defaultValue(defaultValue) .build(); Configuration conf = new ConcurrentConfiguration(); assertEquals(defaultValue, key.getDouble(conf), 0.0001); assertEquals(defaultValue, key.get(conf)); double newValue = (defaultValue * 2); key.set(conf, newValue); assertEquals(newValue, key.getDouble(conf), 0.0001); assertEquals(newValue, key.get(conf)); }