public void consume() throws InterruptedException {
    var item = queue.take();
    LOGGER.info("Consumer [{}] consume item [{}] produced by [{}]", name,
        item.id(), item.producer());

  }
@Test
  void testConsume() throws Exception {
    final var queue = spy(new ItemQueue());
    for (var id = 0; id < ITEM_COUNT; id++) {
      queue.put(new Item("producer", id));
    }

    reset(queue); // Don't count the preparation above as interactions with the queue
    final var consumer = new Consumer("consumer", queue);

    for (var id = 0; id < ITEM_COUNT; id++) {
      consumer.consume();
    }

    verify(queue, times(ITEM_COUNT)).take();
  }