}
});
when(transactionTable.getLocalTransactions()).thenReturn(Collections.<LocalTransaction>emptyList());
when(transactionTable.getRemoteTransactions()).thenReturn(Collections.<RemoteTransaction>emptyList());
cacheTopology = new CacheTopology(1, ch1, ch1);
stateProvider.onTopologyUpdate(cacheTopology, false);
log.debug("ch1: " + ch1);
Set<Integer> segmentsToRequest = ch1.getSegmentsForOwner(members1.get(0));
List<TransactionInfo> transactions = stateProvider.getTransactionsForSegments(members1.get(0), 1, segmentsToRequest);
assertEquals(0, transactions.size());
try {
stateProvider.getTransactionsForSegments(members1.get(0), 1, new HashSet<Integer>(Arrays.asList(2, numSegments)));
fail("IllegalArgumentException expected");
} catch (IllegalArgumentException e) {
// expected
}
verifyNoMoreInteractions(stateTransferLock);
stateProvider.startOutboundTransfer(F, 1, Collections.singleton(0));
assertTrue(stateProvider.isStateTransferInProgress());
// TestingUtil.sleepThread(15000);
log.debug("ch2: " + ch2);
cacheTopology = new CacheTopology(2, ch2, ch2);
stateProvider.onTopologyUpdate(cacheTopology, false);
assertFalse(stateProvider.isStateTransferInProgress());
stateProvider.startOutboundTransfer(E, 1, Collections.singleton(0));