S3FileSystem extends FileSystem<S3ResourceId> { @Override protected void copy(List<S3ResourceId> sourcePaths, List<S3ResourceId> destinationPaths) throws IOException { checkArgument( sourcePaths.size() == destinationPaths.size(), "sizes of sourcePaths and destinationPaths do not match"); List<Callable<Void>> tasks = new ArrayList<>(sourcePaths.size()); Iterator<S3ResourceId> sourcePathsIterator = sourcePaths.iterator(); Iterator<S3ResourceId> destinationPathsIterator = destinationPaths.iterator(); while (sourcePathsIterator.hasNext()) { final S3ResourceId sourcePath = sourcePathsIterator.next(); final S3ResourceId destinationPath = destinationPathsIterator.next(); tasks.add( () -> { copy(sourcePath, destinationPath); return null; }); } callTasks(tasks); } S3FileSystem(S3Options options);   }
@Test public void testCopy() throws IOException { testCopy(s3Options()); testCopy(s3OptionsWithSSECustomerKey()); }