use of org.neo4j.server.web.WebServer in project neo4j by neo4j.
the class TransactionModuleTest method shouldRegisterASingleUri.
@SuppressWarnings("unchecked")
@Test
public void shouldRegisterASingleUri() {
// Given
WebServer webServer = mock(WebServer.class);
Config config = Config.defaults(ServerSettings.db_api_path, URI.create("/db/data"));
// When
TransactionModule module = new TransactionModule(webServer, config);
module.start();
// Then
ArgumentCaptor<List<Class<?>>> captor = ArgumentCaptor.forClass(List.class);
verify(webServer).addJAXRSClasses(captor.capture(), anyString(), any());
assertThat(captor.getValue()).isNotEmpty();
}
Aggregations