@Test
public void testPricing() throws Exception {
final ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler();
final List<DataListener> listeners = new ArrayList<DataListener>();
TemplateDataListener l1 = new TemplateDataListener(10, 3, "/templates/test_pricing1.drl");
listeners.add(l1);
TemplateDataListener l2 = new TemplateDataListener(30, 3, "/templates/test_pricing2.drl");
listeners.add(l2);
converter.compile("/data/ExamplePolicyPricing.xls", InputType.XLS, listeners);
//COMPILE
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newByteArrayResource(l1.renderDRL().getBytes()), ResourceType.DRL);
kbuilder.add(ResourceFactory.newByteArrayResource(l2.renderDRL().getBytes()), ResourceType.DRL);
assertFalse(kbuilder.hasErrors());
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession kSession = kbase.newStatefulKnowledgeSession();