*/
public void testAddLocalCasProcessor() throws Exception {
CpeCasProcessors processors = cpe.getCpeCasProcessors();
// Create Detag CasProcessor
CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
"DupShingle Miner", "Detag:DetagContent");
localProcessor.setDescriptor("c://cpm/annotators/example.xml");
localProcessor.setExecutable("/some/path/executable.sh");
localProcessor.addDeployParam("Parm1", "Value1x");
localProcessor.addDeployParam("vnsHost", "Host1x");
localProcessor.addExecArg("-DVNS_HOST=localhost");
localProcessor.addExecArg("-DVNS_PORT=9905");
localProcessor.setCasProcessorFilter("where Detag:DetagContent");
localProcessor.setBatchSize(4);
localProcessor.setMaxErrorCount(52);
localProcessor.setMaxErrorSampleSize(503);
localProcessor.setActionOnMaxError("continue");
localProcessor.setMaxRestartCount(2);
localProcessor.setActionOnMaxRestart("continue");
localProcessor.setTimeout(5001);
processors.addCpeCasProcessor(localProcessor);
assertEquals("Name", "DupShingle Miner", localProcessor.getName());
assertEquals("Descriptor()", "c://cpm/annotators/example.xml", localProcessor.getDescriptor());
assertEquals("DeploymentParam", "Value1x",
((localProcessor.getDeploymentParams()).get("Parm1")).getParameterValue());
assertEquals("DeploymentParam", "Host1x", ((localProcessor.getDeploymentParams())
.get("vnsHost")).getParameterValue());
assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent", localProcessor
.getCasProcessorFilter());
assertEquals("BatchSize", 4, localProcessor.getBatchSize());
assertEquals("MaxErrorCount", 52, localProcessor.getMaxErrorCount());
assertEquals("MaxErrorSampleSize", 503, localProcessor.getMaxErrorSampleSize());
assertEquals("ActionOnMaxError", "continue", localProcessor.getActionOnMaxError());
assertEquals("MaxRestartCount", 2, localProcessor.getMaxRestartCount());
assertEquals("ActionOnMaxRestart", "continue", localProcessor.getActionOnMaxRestart());
assertEquals("Timeout", 5001, localProcessor.getTimeout());
}