@Test public void handleExceptionsReturnsResponseWhenSuccessful() { ResponseEntity<?> response = resource.handleExceptions(() -> ok("ok")); assertThat(response.getStatusCode(), is(OK)); assertThat(response.getBody(), is("ok")); }
protected ResponseEntity<?> handleExceptions(Supplier<ResponseEntity<?>> response) { return handleExceptions(response::get, this::toErrorResponse); }
SpringWebResource extends ResourceBase { protected ResponseEntity<?> handleExceptions(Supplier<ResponseEntity<?>> response) { return handleExceptions(response::get, this::toErrorResponse); } }
SpringWebResource extends ResourceBase { protected ResponseEntity<?> handleExceptions(Supplier<ResponseEntity<?>> response) { return handleExceptions(response::get, this::toErrorResponse); }  }
SpringWebResource extends ResourceBase { protected ResponseEntity<?> handleExceptions(Supplier<ResponseEntity<?>> response) { return handleExceptions(response::get, this::toErrorResponse); }   }
SpringWebResource extends ResourceBase { protected ResponseEntity<?> handleExceptions(Supplier<ResponseEntity<?>> response) { return handleExceptions(response::get, this::toErrorResponse); }    }