@Test public void healthCheckEndpoint_should_always_return_http_status_code_200() { @SuppressWarnings("unchecked") RequestInfo<Void> requestMock = mock(RequestInfo.class); Executor executorMock = mock(Executor.class); ChannelHandlerContext ctxMock = mock(ChannelHandlerContext.class); CompletableFuture<ResponseInfo<Void>> responseFuture = healthCheckEndpoint.execute( requestMock, executorMock, ctxMock ); ResponseInfo<Void> responseInfo = responseFuture.join(); assertThat(responseInfo.getHttpStatusCode()).isEqualTo(200); }
@Override public @NotNull CompletableFuture<ResponseInfo<Void>> execute( @NotNull RequestInfo<Void> request, @NotNull Executor longRunningTaskExecutor, @NotNull ChannelHandlerContext ctx ) { return CompletableFuture.completedFuture(ResponseInfo.<Void>newBuilder().withHttpStatusCode(200).build()); }
HealthCheckEndpoint extends StandardEndpoint<Void, Void> { @Override public @NotNull CompletableFuture<ResponseInfo<Void>> execute( @NotNull RequestInfo<Void> request, @NotNull Executor longRunningTaskExecutor, @NotNull ChannelHandlerContext ctx ) { return CompletableFuture.completedFuture(ResponseInfo.<Void>newBuilder().withHttpStatusCode(200).build()); } }
HealthCheckEndpoint extends StandardEndpoint<Void, Void> { @Override public @NotNull CompletableFuture<ResponseInfo<Void>> execute( @NotNull RequestInfo<Void> request, @NotNull Executor longRunningTaskExecutor, @NotNull ChannelHandlerContext ctx ) { return CompletableFuture.completedFuture(ResponseInfo.<Void>newBuilder().withHttpStatusCode(200).build()); }  }
HealthCheckEndpoint extends StandardEndpoint<Void, Void> { @Override public @NotNull CompletableFuture<ResponseInfo<Void>> execute( @NotNull RequestInfo<Void> request, @NotNull Executor longRunningTaskExecutor, @NotNull ChannelHandlerContext ctx ) { return CompletableFuture.completedFuture(ResponseInfo.<Void>newBuilder().withHttpStatusCode(200).build()); }  @Override @NotNull CompletableFuture<ResponseInfo<Void>> execute(
        @NotNull RequestInfo<Void> request,
        @NotNull Executor longRunningTaskExecutor,
        @NotNull ChannelHandlerContext ctx
    ); @Override @NotNull Matcher requestMatcher(); }
HealthCheckEndpoint extends StandardEndpoint<Void, Void> { @Override public @NotNull CompletableFuture<ResponseInfo<Void>> execute( @NotNull RequestInfo<Void> request, @NotNull Executor longRunningTaskExecutor, @NotNull ChannelHandlerContext ctx ) { return CompletableFuture.completedFuture(ResponseInfo.<Void>newBuilder().withHttpStatusCode(200).build()); }  @Override @NotNull CompletableFuture<ResponseInfo<Void>> execute(
        @NotNull RequestInfo<Void> request,
        @NotNull Executor longRunningTaskExecutor,
        @NotNull ChannelHandlerContext ctx
    ); @Override @NotNull Matcher requestMatcher();  }