private void closeStreamViaBackgroundThread(CountDownLatch startLatch) {

		new Thread(() -> {
			try {
				startLatch.await(2, TimeUnit.SECONDS);

				// the smallest of sleeps to give the thread a chance to read after the latch was reached
				sleep(10);

				ip.getStdin().close();
			}
			catch (InterruptedException | IOException e) {
				// ignore
			}
		}).start();
	}
Test the InterpreterPanel/InterpreterConsole's stdIn InputStream handling by 
manually creating a JFrame (while a regular Ghidra tool is running)
to host the panel in.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/interpreter/InterpreterPanelTest.java