@Test public void returnsWithInformationWhenChangesAreUnnecessary() { mockRegistryReload(completedFuture(unchanged("this test returns 'no meaningful changes'"))); HttpResponse response = Mono.from(handler.handle(get("/").build(), mock(HttpInterceptor.Context.class))).block(); assertThat(response.status(), is(OK)); assertThat(response.bodyAs(UTF_8), is("Origins were not reloaded because this test returns 'no meaningful changes'.\n")); }
@Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context);  }