monitor.worked(1);
try {
SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 2);
FeatureStore<SimpleFeatureType, SimpleFeature> destination = targetLayer.getResource(
FeatureStore.class, subProgressMonitor);
subProgressMonitor.done();
worked[0] += 2;
subProgressMonitor = new SubProgressMonitor(monitor, 2);
FeatureSource<SimpleFeatureType, SimpleFeature> source = sourceLayer.getResource(
FeatureSource.class, subProgressMonitor);
subProgressMonitor.done();