SerializableConfiguration implements Externalizable { public Configuration get() { return conf; } SerializableConfiguration();  SerializableConfiguration(Configuration conf); Configuration get(); @Override void writeExternal(ObjectOutput out); @Override void readExternal(ObjectInput in); static Job newJob(@Nullable SerializableConfiguration conf); static Configuration newConfiguration(@Nullable SerializableConfiguration conf);  }
@Test public void testSerializationDeserialization() { Configuration conf = new Configuration(); conf.set("hadoop.silly.test", "test-value"); byte[] object = SerializationUtils.serialize(new SerializableConfiguration(conf)); SerializableConfiguration serConf = SerializationUtils.deserialize(object); assertNotNull(serConf); assertEquals("test-value", serConf.get().get("hadoop.silly.test")); }
@Test public void testConstruction() { assertNotNull(DEFAULT_SERIALIZABLE_CONF); assertNotNull(DEFAULT_SERIALIZABLE_CONF.get()); thrown.expect(NullPointerException.class); new SerializableConfiguration(null); }