HttpTestServer now is AutoCloseable:

you can do this:
try (HttpTestServer testServer = new HttpTestServer(1234))
{