fm.put("listsURL", defURL);
ExtendedGazetteer gaz = (ExtendedGazetteer)Factory.createResource(
"at.ofai.gate.extendedgazetteer.ExtendedGazetteer", fm);
String origclass = gaz.getClass().getName();
// create a serial corpus controller and add the PR
SerialAnalyserController cont =
(SerialAnalyserController)
Factory.createResource(
"gate.creole.SerialAnalyserController",
Factory.newFeatureMap(),
Factory.newFeatureMap(),
"TestController");
cont.add(gaz);
// duplicate the controller and check what class the duplicated PR has
SerialAnalyserController dup = (SerialAnalyserController)Factory.duplicate(cont);
ProcessingResource res = (ProcessingResource)(dup.getPRs()).iterator().next();
assertEquals(origclass, res.getClass().getName());
}