@BeforeClass public static void startServer() throws Exception { Spark.port(PORT); Spark.get("/hello", "text/plain", (req, res) -> "Hello"); RawHttp.waitForPortToBeTaken(PORT, Duration.ofSeconds(2)); }
RawHttp.waitForPortToBeTaken(8084, Duration.ofSeconds(2));