@Test
public void handleExceptionsReturnsBadRequestForIllagelStateException() {

  String response = resource.handleExceptions(() -> {
    throw new IllegalArgumentException("error");
  }, this::toError);
  assertThat(response, is("400 error"));
}