commandService = new DefaultCommandService(kContext);
QueryCommand queryCommand = new QueryCommand("out", "myQuery", new Object[]{});
SetVariableCommandFromCommand setVariableCmd = new SetVariableCommandFromCommand("__TEMP__", "query123", queryCommand);
KnowledgeContextResolveFromContextCommand resolveFromContextCommand = new KnowledgeContextResolveFromContextCommand(setVariableCmd,
null, null, "ksession", "localResults");
ExecutionResults results = (ExecutionResults) commandService.execute(resolveFromContextCommand);
// I'm not expecting any results here
assertNull(results);
GetVariableCommand getVariableCmd = new GetVariableCommand("query123", "__TEMP__");
resolveFromContextCommand = new KnowledgeContextResolveFromContextCommand(getVariableCmd,
null, null, "ksession", "localResults");
NativeQueryResults queryResults = (NativeQueryResults) commandService.execute(resolveFromContextCommand);
assertNotNull(queryResults);