public void produce() throws InterruptedException {

    var item = new Item(name, itemId++);
    queue.put(item);
    Thread.sleep(RANDOM.nextInt(2000));
  }
@Test
  void testProduce() {
    assertTimeout(ofMillis(6000), () -> {
      final var queue = mock(ItemQueue.class);
      final var producer = new Producer("producer", queue);

      producer.produce();
      verify(queue).put(any(Item.class));

      verifyNoMoreInteractions(queue);
    });
  }