LeftTupleSource leftTupleSource = (LeftTupleSource) context.get( leftInput );
LeftTupleSink mockedSink = Mockito.mock( LeftTupleSink.class,
Mockito.withSettings().extraInterfaces( DSLMock.class ) );
Mockito.when( mockedSink.createLeftTuple( (InternalFactHandle) anyObject(), (LeftTupleSink) anyObject(), anyBoolean() ) ).thenAnswer( new Answer() {
public Object answer(InvocationOnMock invocation) throws Throwable {
Object[] args = invocation.getArguments();
return new LeftTupleImpl((InternalFactHandle)args[0], (LeftTupleSink)args[1], ((Boolean)args[2]).booleanValue() );
}
});
Mockito.when( mockedSink.createLeftTuple( (LeftTuple) anyObject(), (LeftTupleSink) anyObject(), (PropagationContext) anyObject(), anyBoolean()) ).thenAnswer( new Answer() {
public Object answer(InvocationOnMock invocation) throws Throwable {
Object[] args = invocation.getArguments();
return new LeftTupleImpl((LeftTuple)args[0], (LeftTupleSink)args[1], (PropagationContext) args[2] , ((Boolean)args[3]).booleanValue() );
}
});
Mockito.when( mockedSink.createLeftTuple( (LeftTuple) anyObject(), (RightTuple) anyObject(), (LeftTupleSink) anyObject()) ).thenAnswer( new Answer() {
public Object answer(InvocationOnMock invocation) throws Throwable {
Object[] args = invocation.getArguments();
return new LeftTupleImpl((LeftTuple)args[0], (RightTuple)args[1], (LeftTupleSink) args[2] );
}
});
Mockito.when( mockedSink.createLeftTuple( (LeftTuple) anyObject(), (RightTuple) anyObject(), (LeftTuple) anyObject(), (LeftTuple) anyObject(), (LeftTupleSink) anyObject(), anyBoolean()) ).thenAnswer( new Answer() {
public Object answer(InvocationOnMock invocation) throws Throwable {
Object[] args = invocation.getArguments();
return new LeftTupleImpl((LeftTuple)args[0], (RightTuple)args[1], (LeftTuple)args[2], (LeftTuple)args[3], (LeftTupleSink)args[4], ((Boolean)args[5]).booleanValue() );
}
});