### Question:
DistCpCopierFactory implements CopierFactory { @Override public Copier newInstance(CopierContext copierContext) { return new DistCpCopier(conf, copierContext.getSourceBaseLocation(), copierContext.getSourceSubLocations(), copierContext.getReplicaLocation(), copierContext.getCopierOptions(), runningMetricsRegistry); } @Autowired  DistCpCopierFactory(@Value("#{sourceHiveConf}") Configuration conf, MetricRegistry runningMetricsRegistry); @Override boolean supportsSchemes(String sourceScheme, String replicaScheme); @Override Copier newInstance(CopierContext copierContext); @Override Copier newInstance(
      String eventId,
      Path sourceBaseLocation,
      Path replicaLocation,
      Map<String, Object> copierOptions); @Override Copier newInstance(
      String eventId,
      Path sourceBaseLocation,
      List<Path> sourceSubLocations,
      Path replicaLocation,
      Map<String, Object> copierOptions);  }### Answer:
@Test public void hdfsTableCopier() { DistCpCopierFactory factory = new DistCpCopierFactory(conf, metricRegistry); Copier copier = factory.newInstance("evt-123", new Path("confLocation"), Collections.<Path> emptyList(), new Path("hdfs:/replicaLocation"), copierOptions); assertEquals(DistCpCopier.class, copier.getClass()); }
@Test public void fileTableCopier() { DistCpCopierFactory factory = new DistCpCopierFactory(conf, metricRegistry); Copier copier = factory.newInstance("evt-123", new Path("confLocation"), Collections.<Path> emptyList(), new Path("file:/replicaLocation"), copierOptions); assertEquals(DistCpCopier.class, copier.getClass()); }
@Test public void s3aTableCopier() { DistCpCopierFactory factory = new DistCpCopierFactory(conf, metricRegistry); Copier copier = factory.newInstance("evt-123", new Path("confLocation"), Collections.<Path> emptyList(), new Path("s3a:/replicaLocation"), copierOptions); assertEquals(DistCpCopier.class, copier.getClass()); }
@Test public void s3TableCopier() { DistCpCopierFactory factory = new DistCpCopierFactory(conf, metricRegistry); Copier copier = factory.newInstance("evt-123", new Path("confLocation"), Collections.<Path> emptyList(), new Path("s3:/replicaLocation"), copierOptions); assertEquals(DistCpCopier.class, copier.getClass()); }
@Test public void s3nTableCopier() { DistCpCopierFactory factory = new DistCpCopierFactory(conf, metricRegistry); Copier copier = factory.newInstance("evt-123", new Path("confLocation"), Collections.<Path> emptyList(), new Path("s3n:/replicaLocation"), copierOptions); assertEquals(DistCpCopier.class, copier.getClass()); }