// Mock an invocation for MockSPName.
StoredProcedureInvocation spi = mock(StoredProcedureInvocation.class);
when(spi.getProcName()).thenReturn(MockSPName);
ParameterSet bleh = mock(ParameterSet.class);
when(spi.getParams()).thenReturn(bleh);
Iv2InitiateTaskMessage task =
new Iv2InitiateTaskMessage(destHSId, // initHSID
Long.MIN_VALUE, // coordHSID
txnId - 1, // truncationHandle
txnId, // txnId
System.currentTimeMillis(), // timestamp
readOnly, // readonly
singlePart, // single-part
spi, // invocation
Long.MAX_VALUE, // client interface handle
Long.MAX_VALUE, // connectionId
false); // isForReplay
// sp: sphandle == txnid
task.setTxnId(txnId);
return task;
}