@Test
	public void testItemsRepeatedlyRequestedToBeProcessed() {

		/*
		 	The execution step of the dialog can be slow, depending upon what work the user is
		 	doing in the callback.  Due to this, the UI allows the user to select the same item
		 	while it is schedule to be processed.   This test ensures that an item processed and
		 	removed in one scheduled request will not be processed again later.
		 */

		List<TestStubRowObject> selected1 = selectRows(0, 1, 2);

		CountDownLatch startLatch = new CountDownLatch(1);
		CountDownLatch continueLatch = new CountDownLatch(1);
		testDecision = r -> {

			//
			// Signal that we have started and wait to continue
			//
			startLatch.countDown();
			waitFor(continueLatch);

			return true; // remove 'r'
		};

		pressExecuteButton();
		waitFor(startLatch);

		List<TestStubRowObject> selected2 = selectRows(1);
		pressExecuteButton();      // schedule the second request
		continueLatch.countDown(); // release the first scheduled request

		waitForDialog();

		assertNotInDialog(selected1);
		assertNotInDialog(selected2);
		assertOnlyExecutedOnce(selected2);
	}
Interface for tests to signal what is expected of the executor
Ghidra/Features/Base/src/test.slow/java/ghidra/app/tablechooser/TableChooserDialogTest.java