void () { List<Integer> childLog = new ArrayList<>(); for (int i = 0; i < 100; i++) { int taskId = i; myQueue.addTask(new TaskWithEquivalentObject("child" + i) { @Override public void perform(@NotNull ProgressIndicator indicator) { childLog.add(taskId); } }); } runAllTasks(); Assert.assertEquals("Every child task are not unique, all must be executed: " + childLog, 100, childLog.size()); }