### Question:
ConfigKey { @SuppressWarnings("unchecked") public List<Object> getList(Configuration conf) { checkArgument(type() == Type.LIST, "'" + name() + "' is NOT a LIST setting"); List<Object> list = (List<Object>) defaultValue(); if (null == list) { list = Collections.emptyList(); } return conf.getList(name(), list); }  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 testGetList() { String keyName = runtime.getMethodName(); List<String> defaultList = Lists.newArrayList( "item1", "item2", "item3" ); ConfigKey key = ConfigKey.builder(keyName) .required(true) .type(Type.LIST) .defaultValue(defaultList) .build(); Configuration conf = new CompositeConfiguration(); assertEquals(defaultList, key.getList(conf)); assertEquals(defaultList, key.get(conf)); List<String> newList = Lists.newArrayList( "item4", "item5", "item6" ); key.set(conf, newList); assertEquals(newList, key.getList(conf)); assertEquals(newList, key.get(conf)); newList = Lists.newArrayList( "item7", "item8", "item9" ); conf.setProperty(key.name(), "item7,item8,item9"); assertEquals(newList, key.getList(conf)); assertEquals(newList, key.get(conf)); }