* @throws Exception
*/
public void testAddIntegratedCasProcessor() throws Exception {
CpeCasProcessors processors = cpe.getCpeCasProcessors();
CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
.produceCasProcessor("WF Writer_X");
assertEquals("name", "WF Writer_X", integratedProcessor.getName());
integratedProcessor.setDescriptor(confLocation + "consumers/bla.xml");
integratedProcessor.setBatchSize(99);
assertEquals("BatchSize", 99, integratedProcessor.getBatchSize());
integratedProcessor.addDeployParam("testversion", "V1.0");
integratedProcessor.setActionOnMaxError("terminate");
integratedProcessor.setActionOnMaxRestart("continue");
integratedProcessor.setBatchSize(25);
integratedProcessor.setCasProcessorFilter("some filter");
integratedProcessor.setMaxErrorCount(300);
integratedProcessor.setMaxErrorSampleSize(100);
integratedProcessor.setMaxRestartCount(5);
integratedProcessor.setTimeout(6000);
integratedProcessor.setName("special name");
processors.addCpeCasProcessor(integratedProcessor);
assertEquals("name", "special name", integratedProcessor.getName());
assertEquals("Descriptor()", confLocation + "consumers/bla.xml", integratedProcessor
.getDescriptor());
assertEquals("DeploymentParam", "V1.0", ((integratedProcessor.getDeploymentParams())
.get("testversion")).getParameterValue());
assertEquals("CasProcessorFilter", "some filter", integratedProcessor.getCasProcessorFilter());
assertEquals("BatchSize", 25, integratedProcessor.getBatchSize());
assertEquals("MaxErrorCount", 300, integratedProcessor.getMaxErrorCount());
assertEquals("MaxErrorSampleSize", 100, integratedProcessor.getMaxErrorSampleSize());
assertEquals("ActionOnMaxError", "terminate", integratedProcessor.getActionOnMaxError());
assertEquals("MaxRestartCount", 5, integratedProcessor.getMaxRestartCount());
assertEquals("ActionOnMaxRestart", "continue", integratedProcessor.getActionOnMaxRestart());
assertEquals("Timeout", 6000, integratedProcessor.getTimeout());
}