public static Job newJob(@Nullable SerializableConfiguration conf) throws IOException {
    if (conf == null) {
      return Job.getInstance();
    } else {
      // Don't reading configuration from slave thread, but only from master thread.
      Job job = Job.getInstance(new Configuration(false));
      for (Map.Entry<String, String> entry : conf.get()) {
        job.getConfiguration().set(entry.getKey(), entry.getValue());
      }
      return job;
    }
  }
@Test
  public void testCreateNewJob() throws Exception {
    Job jobFromNull = SerializableConfiguration.newJob(null);
    assertNotNull(jobFromNull);
    Job job = SerializableConfiguration.newJob(DEFAULT_SERIALIZABLE_CONF);
    assertNotNull(job);
  }