@Override public void onEvent(ApplicationEvent event) {
    // only onRequest is used
  }
@Test void onEvent_skipsErrorWhenSet() {
    setEventType(RequestEvent.Type.FINISHED);
    setBaseUri("/");

    when(request.getProperty(SpanCustomizer.class.getName())).thenReturn(span);

    Exception error = new Exception();
    when(requestEvent.getException()).thenReturn(error);
    when(request.getProperty("error")).thenReturn("madness");

    listener.onEvent(requestEvent);

    verify(request).getProperty(SpanCustomizer.class.getName());
    verify(request).getProperty("error");
    verify(request).getUriInfo();
    verify(request).setProperty("http.route", ""); // empty means no route found
    verifyNoMoreInteractions(request); // no setting of error
  }