public int getNextId() {
    var find = new Document("_id", TICKET_ID);
    var increase = new Document("seq", 1);
    var update = new Document("$inc", increase);
    var result = countersCollection.findOneAndUpdate(find, update);
    return result.getInteger("seq");
  }
@Test
  void testNextId() {
    assertEquals(1, repository.getNextId());
    assertEquals(2, repository.getNextId());
    assertEquals(3, repository.getNextId());
  }