Method pojoMethod = Pojo.class.getMethod("method", new Class[] { KnowledgeHelper.class,
String.class, Object.class });
Rule rule = new Rule("test");
MockControl controlKnowledgeHelperArgument = mocks.createControl(Argument.class);
Argument mockKnowledgeHelperArgument = (Argument) controlKnowledgeHelperArgument.getMock();
MockControl controlFactArgument = mocks.createControl(Argument.class);
Argument mockFactArgument = (Argument) controlFactArgument.getMock();
MockControl controlApplicationDataArgument = mocks.createControl(Argument.class);
Argument mockApplicationDataArgument = (Argument) controlApplicationDataArgument.getMock();
MockControl controlTuple = mocks.createControl(Tuple.class);
Tuple mockTuple = (Tuple)controlTuple.getMock();
MockControl controlKnowledgeHelper = mocks.createControl(KnowledgeHelper.class);
KnowledgeHelper mockKnowledgeHelper = (KnowledgeHelper) controlKnowledgeHelper.getMock();
String p1 = "p1";
Object a1 = new Object();
controlKnowledgeHelperArgument.expectAndReturn(
mockKnowledgeHelperArgument.getValue(mockTuple),
mockKnowledgeHelper);
controlFactArgument.expectAndReturn(
mockFactArgument.getValue(mockTuple), p1);
controlApplicationDataArgument.expectAndReturn(
mockApplicationDataArgument.getValue(mockTuple), a1);
Argument[] parameterValues = new Argument[] {
mockKnowledgeHelperArgument, mockFactArgument, mockApplicationDataArgument };
mocks.replay();