Configuration implements Serializable { public Configuration set(String key, String value) { checkReadOnly(); properties.put(key, value); return this; } Configuration();   Configuration(Configuration configuration); String get(String key, String defaultString); Configuration set(String key, String value); boolean getBoolean(String key, boolean defaultValue); boolean getBoolean(String key); short getShort(String key, short defaultValue); short getShort(String key); long getLong(String key, long defaultValue); long getLong(String key); int getInt(String key, int defaultValue); int getInt(String key); double getDouble(String key, double defaultValue); double getDouble(String key); float getFloat(String key, float defaultValue); float getFloat(String key); List<String> getList(String key, List<String> defaultValue); List<String> getList(String key); @SuppressWarnings("unchecked") Class<T> getClass(String key); void registerSerializer(Serializer serializer); Serializer getSerializer(Class cls); Serializers getSerializers(); @Override boolean equals(Object o); @Override int hashCode(); final static String MMAP_SEGMENT_SIZE; final static String MMAP_DATA_ENABLED; final static String LOAD_FACTOR; final static String CACHE_ENABLED; final static String CACHE_BYTES; final static String CACHE_INITIAL_CAPACITY; final static String CACHE_LOAD_FACTOR; final static String COMPRESSION_ENABLED; }
@Test(expectedExceptions = UnsupportedOperationException.class) public void testConfigurationReadOnly() { Configuration c = new Configuration(); c.set("foo", "bar"); Configuration r = new Configuration(c); r.set("foo", "bar"); }