HierachicalConfiguration extends AbstractConfiguration { @Override public void define(final String key, final Object value) { throw new UnsupportedOperationException(); } HierachicalConfiguration(final Configuration configuration); static Configuration create(final Configuration... configurations); @Override Configuration getSubconfiguration(final String key); @Override Object getValue(final String key); @Override Map<String, Object> asMap(); @Override void define(final String key, final Object value); @Override void remove(String key);  }
@Test(expected = UnsupportedOperationException.class) public void testDefine() { Configuration conf = new HierachicalConfiguration(new DummyConfiguration()); conf.define(randomUUID().toString(), randomUUID().toString()); }