@Test
public void testCancelAllOperations() {

    int numItems = 250;
    RunnableHolder runnables = new RunnableHolder(numItems);
    runnables.addOperations(fixture);
    fixture.cancelAllOperations();
    fixture.waitUntilAllOperationsAreFinished();
    assertEquals(0, fixture.operationCount().intValue());
    int firstFailure = runnables.firstFailure();
    assertTrue("Not all should pass: " + firstFailure, 0 < firstFailure && firstFailure < numItems );
    assertTrue(runnables.ops[firstFailure].isCancelled()||runnables.ops[firstFailure].isReady());
}