IllegalArgumentException: Bound must be positive
The issue is that you are calling Random.nextInt() with a zero and it doesn’t like that. That is happening because the List from getAllItems() is empty. I would prevent this situation by checking that the list has items before performing your logic: