@Test
public void testCopyStrategy() {

  DistCpOptions options = OptionsParser.parse(new String[] {
      "-strategy",
      "dynamic",
      "-f",
      "hdfs://localhost:8020/source/first",
      "hdfs://localhost:8020/target/"});
  Assert.assertEquals(options.getCopyStrategy(), "dynamic");
  options = OptionsParser.parse(new String[] {
      "-f",
      "hdfs://localhost:8020/source/first",
      "hdfs://localhost:8020/target/"});
  Assert.assertEquals(options.getCopyStrategy(), DistCpConstants.DEFAULT_COPY_STRATEGY);
  options = OptionsParser.parse(new String[] {
      "-strategy",
      "dynamic",
      "-f",
      "hdfs://localhost:8020/source/first",
      "hdfs://localhost:8020/target/"});
  Assert.assertEquals(options.getCopyStrategy(), "dynamic");
}