private static <TI extends Enum<TI>, TO extends Enum<TO>> TO convertEnum(Enum<TI> from, Class<TO> toEnumOfClass) {
    if (from != null) {
      try {
        return Enum.valueOf(toEnumOfClass, from.name());
      }
      catch (IllegalArgumentException ignored) { }
    }
    return Enum.valueOf(toEnumOfClass, "UNKNOWN");
  }
private static <TI extends Enum<TI>, TO extends Enum<TO>> TO convertEnum(Enum<TI> from, Class<TO> toEnumOfClass)