@Test public void shouldShowJson() throws IOException { HttpURLConnection connection = (HttpURLConnection) new URL(server.getURL() + "/demo/openapi.yaml").openConnection(); assertThat(connection.getResponseCode()).isEqualTo(200); StringWriter writer = new StringWriter(); new BufferedReader(new InputStreamReader(connection.getInputStream())).transferTo(writer); assertThat(writer.toString()) .contains("Swagger Petstore"); }
public String getURL() { return "http: }
DemoServer { public String getURL() { return "http: } }
DemoServer { public String getURL() { return "http: } DemoServer(InetSocketAddress inetSocketAddress);  DemoServer(int port); }
DemoServer { public String getURL() { return "http: } DemoServer(InetSocketAddress inetSocketAddress);  DemoServer(int port); void start(); void stop(int delay); String getURL(); static void main(String[] args); }
DemoServer { public String getURL() { return "http: } DemoServer(InetSocketAddress inetSocketAddress);  DemoServer(int port); void start(); void stop(int delay); String getURL(); static void main(String[] args);  }