@Nullable Throwable maybeError() {
    Object maybeError = delegate.getAttribute("error");
    if (maybeError instanceof Throwable) return (Throwable) maybeError;
    maybeError = delegate.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
    if (maybeError instanceof Throwable) return (Throwable) maybeError;
    return null;
  }
@Test void maybeError_fromRequestAttribute() {
    Exception requestError = new Exception();
    when(request.getAttribute("error")).thenReturn(requestError);

    assertThat(wrapper.maybeError()).isSameAs(requestError);
  }