public synchronized boolean isTwoElement(@NotNull ConsoleCommunication consoleComm) {
    var queue = getQueue(consoleComm);
    if (queue == null) return false;
    return queue.size() == 2;
  }
public synchronized boolean isTwoElement(@NotNull ConsoleCommunication consoleComm)