@Test public void handleExceptionsReturnsResponseWhenSuccessful() { try (Response response = resource.handleExceptions(() -> ok("ok"))) { assertThat(response.getStatus(), is(OK.getStatusCode())); assertThat(response.readEntity(String.class), is("ok")); } }
protected Response handleExceptions(Supplier<ResponseBuilder> responseBuilder) { return handleExceptions(() -> responseBuilder.get().build(), this::toErrorResponse); }
JaxRsResource extends ResourceBase { protected Response handleExceptions(Supplier<ResponseBuilder> responseBuilder) { return handleExceptions(() -> responseBuilder.get().build(), this::toErrorResponse); } }
JaxRsResource extends ResourceBase { protected Response handleExceptions(Supplier<ResponseBuilder> responseBuilder) { return handleExceptions(() -> responseBuilder.get().build(), this::toErrorResponse); }  }
JaxRsResource extends ResourceBase { protected Response handleExceptions(Supplier<ResponseBuilder> responseBuilder) { return handleExceptions(() -> responseBuilder.get().build(), this::toErrorResponse); }   }
JaxRsResource extends ResourceBase { protected Response handleExceptions(Supplier<ResponseBuilder> responseBuilder) { return handleExceptions(() -> responseBuilder.get().build(), this::toErrorResponse); }    }