@Test
public void testAwaitTermination() throws Exception {

    int count=100;
    Object lock = new Object();
    queueUpSomeTasks(lock, count);
    List<Runnable> outstandingTasks = fixture.shutdownNow();
    assertEquals(count, outstandingTasks.size());
    assertTrue(fixture.isShutdown());
    synchronized(lock) {
        lock.notifyAll();
    }
    assertTrue(fixture.awaitTermination(5, TimeUnit.SECONDS));
    assertTrue(fixture.isTerminated());
}