@BeforeClass public static void setup() throws Exception { server = ServerBuilder.server().build(); server.start(); webdriverFacade = new WebDriverFacade(); wl = new WebadminWebdriverLibrary(webdriverFacade, server.baseUri().toString()); }
@Test public void shouldRegisterASingleUri() throws Exception { WebServer webServer = mock(WebServer.class); NeoServerWithEmbeddedWebServer neoServer = mock(NeoServerWithEmbeddedWebServer.class); when(neoServer.baseUri()).thenReturn(new URI("http://localhost:7575")); when(neoServer.getWebServer()).thenReturn(webServer); Configuration config = new PropertiesConfiguration(); String path = "/db/data"; config.addProperty(Configurator.REST_API_PATH_PROPERTY_KEY, path); when(neoServer.getConfiguration()).thenReturn(config); RESTApiModule module = new RESTApiModule(); module.start(neoServer, null); verify(webServer).addJAXRSPackages(any(List.class), anyString()); }