KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ksession = createKnowledgeSession(kbase);
List<Command<?>> commands = new ArrayList<Command<?>>();
commands.add(new NewKnowledgeBuilderCommand("kbuilder"));
commands.add(new KnowledgeBuilderAddCommand(res, ResourceType.DRL, null));
Command<?> cmds = CommandFactory.newBatchExecution( commands );
ExecutionResults result = (ExecutionResults) ksession.execute( cmds );
assertNotNull(result);