@Test public void returnsNoContentStatusWhenNoProvidersAvailable() { StyxObjectStore<StyxObjectRecord<StyxService>> empty = new StyxObjectStore<>(); ServiceProviderHandler handler = new ServiceProviderHandler(empty); HttpRequest request = HttpRequest.get("/admin/service/providers").build(); HttpResponse response = Mono.from(handler.handle(request, requestContext())).block(); assertThat(response.status(), equalTo(NO_CONTENT)); assertFalse(response.contentLength().isPresent()); }
@Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return urlRouter.handle(request, context); }
ServiceProviderHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return urlRouter.handle(request, context); } }
ServiceProviderHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return urlRouter.handle(request, context); } ServiceProviderHandler(StyxObjectStore<StyxObjectRecord<StyxService>> providerDatabase); }
ServiceProviderHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return urlRouter.handle(request, context); } ServiceProviderHandler(StyxObjectStore<StyxObjectRecord<StyxService>> providerDatabase); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context); static ObjectMapper yamlMapper(); }
ServiceProviderHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return urlRouter.handle(request, context); } ServiceProviderHandler(StyxObjectStore<StyxObjectRecord<StyxService>> providerDatabase); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context); static ObjectMapper yamlMapper();  }