@Override public WebServer getWebServer(ServletContextInitializer... initializers) { this.webServer = spy( new MockServletWebServer(mergeInitializers(initializers), getPort())); return this.webServer; }
private TestWebServerInitializedEvent(String serverId, int port) { super(mock(WebServer.class)); this.serverId = serverId; this.server = mock(WebServer.class); when(server.getPort()).thenReturn(port); }
@Override public WebServer getWebServer() { return this.server; }