### Question:
ConfigKey { public String getString(Configuration conf) { return conf.getString(name(), defaultValueAsString()); }  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 testGetString() { String keyName = runtime.getMethodName(); String defaultValue = "default-string-value"; ConfigKey key = ConfigKey.builder(keyName) .required(true) .type(Type.STRING) .defaultValue(defaultValue) .build(); Configuration conf = new CompositeConfiguration(); assertEquals(defaultValue, key.getString(conf)); assertEquals(defaultValue, key.get(conf)); String newValue = "new-string-value"; key.set(conf, newValue); assertEquals(newValue, key.getString(conf)); assertEquals(newValue, key.get(conf)); }