@Test
public void testBandwidthOnReducedPartitions()
{

  when(partitionContextMock.getParallelPartitionCount()).thenReturn(2);
  when(bandwidthManagerMock.getBandwidth()).thenReturn(2L);
  Collection<Partition<BandwidthLimitingOperator>> partitions = Lists.newArrayList();
  for (int i = 5; i-- > 0;) {
    partitions.add(new DefaultPartition<BandwidthLimitingOperator>(operatorMock));
  }
  underTest.definePartitions(partitions, partitionContextMock);
  verify(bandwidthManagerMock, times(2)).setBandwidth(5L);
}