@Test
public void handleExceptionsReturnsResponseOnFailure() {

  ResponseEntity<?> response = resource.handleExceptions(() -> {
    throw new RuntimeException("error");
  });
  assertThat(response.getStatusCode(), is(INTERNAL_SERVER_ERROR));
  assertThat(((ErrorResponse) response.getBody()).error, is("error"));
}