@Test
	public void testWrongServerURL() throws IOException {
		// test what happens when the server returns 404's for the REST api requests
		HttpServer server = createMockHttpServer();
		try {
			server.start();
			LibreTranslateStringTranslationService sts =
				new LibreTranslateStringTranslationService(getURI(server.getAddress()), null,
					AUTO, "en", 100, 1000, 1000);

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

			waitForTasks();

			// we SHOULD get an error dialog because got bad http status result
			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