// System.err.println("Items: " + items);
// Extra tasks will be submitted before the termination is detected
assertEquals(total, items.size() - frequency);
assertTrue(frequency <= throttleLimit + 1);
taskExecutor.destroy();
}
@Test
public void testThrottleLimitEarlyFinishOneThread() throws Exception {