* @throws Exception
*/
public void testAddRemoteCasProcessor() throws Exception {
CpeCasProcessors processors = cpe.getCpeCasProcessors();
CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
.produceRemoteCasProcessor("Detag Miner _2_");
remoteProcessor.setDescriptor("c://cpm/annotators/dummy.xml");
remoteProcessor.addDeployParam("vnsPort", "9999");
remoteProcessor.addDeployParam("vnsHost", "localhost");
remoteProcessor.setCasProcessorFilter("where Detag:DetagContent_2");
remoteProcessor.setBatchSize(5);
remoteProcessor.setMaxErrorCount(51);
remoteProcessor.setMaxErrorSampleSize(505);
remoteProcessor.setActionOnMaxError("continue");
remoteProcessor.setMaxRestartCount(2);
remoteProcessor.setActionOnMaxRestart("continue");
remoteProcessor.setTimeout(5002);
processors.addCpeCasProcessor(remoteProcessor);
assertEquals("Name", "Detag Miner _2_", remoteProcessor.getName());
assertEquals("Descriptor()", "c://cpm/annotators/dummy.xml", remoteProcessor.getDescriptor());
assertEquals("DeploymentParam", "9999",
((remoteProcessor.getDeploymentParams()).get("vnsPort")).getParameterValue());
assertEquals("DeploymentParam", "localhost", ((remoteProcessor.getDeploymentParams())
.get("vnsHost")).getParameterValue());
assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent_2", remoteProcessor
.getCasProcessorFilter());
assertEquals("BatchSize", 5, remoteProcessor.getBatchSize());
assertEquals("MaxErrorCount", 51, remoteProcessor.getMaxErrorCount());
assertEquals("MaxErrorSampleSize", 505, remoteProcessor.getMaxErrorSampleSize());
assertEquals("ActionOnMaxError", "continue", remoteProcessor.getActionOnMaxError());
assertEquals("MaxRestartCount", 2, remoteProcessor.getMaxRestartCount());
assertEquals("ActionOnMaxRestart", "continue", remoteProcessor.getActionOnMaxRestart());
assertEquals("Timeout", 5002, remoteProcessor.getTimeout());
}