@Test
public void testErrorHandlingWithUserError() {

  IllegalArgumentException e =
      assertThrows(
          IllegalArgumentException.class,
          () ->
              ERROR_CONTEXT.run(
                  () -> {
                    throw new IllegalArgumentException("User error");
                  }));
  assertThat(e).hasMessageThat().isEqualTo("User error");
}