### Question:
SeriesTaskExecutorThread implements Runnable { @Override public void run() { if (queue == null) throw new IllegalStateException("Must assign a queue before starting."); try { taskExecutor.start(); } catch (DataLayerException e) { throw new IllegalStateException("Cannot start task executor", e); } while (!Thread.currentThread().isInterrupted()) { try { Task task = queue.take(); debug("process Task {0}", task); taskExecutor.execute(null, task); } catch (InterruptedException e) { error("interrupt detected", e); Thread.currentThread().interrupt(); } } debug("Processor thread shutdown."); } @Inject  SeriesTaskExecutorThread(@Named(CoreTokenConstants.CTS_DEBUG) Debug debug, SimpleTaskExecutor taskExecutor); void setQueue(BlockingQueue<Task> queue); @Override void run();  }### Answer:
@Test (expectedExceptions = IllegalStateException.class) public void shouldNotStartWithoutQueueAssigned() { processor.run(); }