@Test(timeout = 20000)
	public void testTimeoutTranslateRequest() throws IOException {
		HttpServer server = createMockHttpServer();

		server.createContext("/translate", wrapHandlerWithDelay(this::mockTranslateHandler, 5000));
		try {
			server.start();
			LibreTranslateStringTranslationService sts = new LibreTranslateStringTranslationService(
				getURI(server.getAddress()), null, AUTO, "en", 100, 1000, 1);

			Swing.runLater(() -> {
				setErrorsExpected(true); // don't kill the test because Msg.showError() was called somewhere
				sts.translate(program, List.of(progLoc(0)), TranslateOptions.NONE);
				setErrorsExpected(false);
			});

			waitForTasks();

			// we SHOULD get an error dialog because we forced the http request to timeout
			AbstractErrDialog errDlg = waitForErrorDialog();
			errDlg.dispose();
		}
		finally {
			server.stop(0);
		}
	}
Tests the LibreTranslateStringTranslationService by creating a mock HTTP server that responds
to the minimal requests the service needs.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/translate/libretranslate/LibreTranslateStringTranslationServiceTest.java