SerializableConfiguration implements Externalizable { public static Configuration newConfiguration(@Nullable SerializableConfiguration conf) { if (conf == null) { return new Configuration(); } else { return conf.get(); } } 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 testCreateNewConfiguration() { Configuration confFromNull = SerializableConfiguration.newConfiguration(null); assertNotNull(confFromNull); Configuration conf = SerializableConfiguration.newConfiguration(new SerializableConfiguration(confFromNull)); assertNotNull(conf); }