when(aide.getNewestSafeTransactionForInitiator(1L)).thenReturn(11L);
when(mbox.recvBlocking(any(Subject[].class), eq(5L)))
.thenReturn(make(um.but(with(sfmSource, 2L))))
.thenReturn(new FaultMessage(0,1))
;
Map<Long,Long> decision =
arbiter.reconfigureOnFault(hsids, new FaultMessage(2,1,ImmutableSet.of(0L,2L,3L)));
verify(mbox,times(1)).deliverFront(any(VoltMessage.class));
verify(mbox,times(1)).send(any(long[].class), any(VoltMessage.class));
verify(mbox).send(any(long[].class), argThat(siteFailureIs(sfmFailed(1), sfmSurvived(0,1,2,3))));
assertEquals(decision,ImmutableMap.<Long,Long>of());
reset(mbox);
when(mbox.recvBlocking(any(Subject[].class), eq(5L)))
.thenReturn(make(um.but(with(sfmSource, 0L))))
.thenReturn(make(um.but(with(sfmSource, 3L))))
;
decision = arbiter.reconfigureOnFault(hsids, new FaultMessage(0,1));
verify(mbox,never()).deliverFront(any(VoltMessage.class));
verify(mbox,times(2)).send(any(long[].class), argThat(siteFailureIs(sfmFailed(1), sfmSurvived(0,2,3))));
assertEquals(decision,ImmutableMap.<Long,Long>of(1L,11L));