when(rpcManager.invokeRemotely(any(Collection.class), any(ReplicableCommand.class), any(ResponseMode.class), anyLong())).thenAnswer(new Answer<Map<Address, Response>>() {
@Override
public Map<Address, Response> answer(InvocationOnMock invocation) {
Collection<Address> recipients = (Collection<Address>) invocation.getArguments()[0];
ReplicableCommand rpcCommand = (ReplicableCommand) invocation.getArguments()[1];
if (rpcCommand instanceof StateRequestCommand) {
StateRequestCommand cmd = (StateRequestCommand) rpcCommand;
Map<Address, Response> results = new HashMap<Address, Response>();
if (cmd.getType().equals(StateRequestCommand.Type.GET_TRANSACTIONS)) {
for (Address recipient : recipients) {