docs: @SuppressWarnings({ "unchecked",
          "PMD.AvoidThrowingNewInstanceOfSameException" })
      public static <T extends Error> T duplicate(T event) {
          try {
              return (T) event.getClass().getConstructor(event.getClass())
                  .newInstance(event);
          } catch (InstantiationException | IllegalAccessException
                  | IllegalArgumentException | InvocationTargetException
                  | NoSuchMethodException | SecurityException e) {
              throw new IllegalArgumentException(e);
          }
      }