@Override
  protected void route(List<SendingMailbox> destinations, TransferableBlock block)
      throws Exception {
    int destinationIdx = _rand.apply(destinations.size());
    sendBlock(destinations.get(destinationIdx), block);
  }
@Test
  public void shouldRouteRandomly()
      throws Exception {
    // Given:
    ImmutableList<SendingMailbox> destinations = ImmutableList.of(_mailbox1, _mailbox2);

    // When:
    new RandomExchange(destinations, size -> 1, TransferableBlockUtils::splitBlock).route(destinations, _block);

    ArgumentCaptor<TransferableBlock> captor = ArgumentCaptor.forClass(TransferableBlock.class);
    // Then:
    Mockito.verify(_mailbox2, Mockito.times(1)).send(captor.capture());
    Assert.assertEquals(captor.getValue(), _block);
  }