AnalyticsClient { public void flush() { enqueue(FlushMessage.POISON); } AnalyticsClient(
      BlockingQueue<Message> messageQueue,
      SegmentService service,
      int maxQueueSize,
      long flushIntervalInMillis,
      Log log,
      ThreadFactory threadFactory,
      ExecutorService networkExecutor,
      List<Callback> callbacks); static AnalyticsClient create(
      SegmentService segmentService,
      int flushQueueSize,
      long flushIntervalInMillis,
      Log log,
      ThreadFactory threadFactory,
      ExecutorService networkExecutor,
      List<Callback> callbacks); void enqueue(Message message); void flush(); void shutdown();  }
@Test public void flushInsertsPoison() throws InterruptedException { AnalyticsClient client = newClient(); client.flush(); verify(messageQueue).put(FlushMessage.POISON); }