@Test
public void testSetIgnoreFailure() {

  final DistCpOptions.Builder builder = new DistCpOptions.Builder(
      Collections.singletonList(new Path("hdfs://localhost:8020/source")),
      new Path("hdfs://localhost:8020/target/"));
  Assert.assertFalse(builder.build().shouldIgnoreFailures());
  builder.withIgnoreFailures(true);
  Assert.assertTrue(builder.build().shouldIgnoreFailures());
}