code: @SuppressWarnings("null")
    public static <T> @NotNull T notNull(@NotNull Adaptable adaptable, @NotNull Class<T> type) {
      T object = adaptable.adaptTo(type);
      if (object == null) {
        throw new UnableToAdaptException(adaptable, type);
      }
      return object;
    }
docs: Try to adapt the adaptable to the given type and ensures that it succeeds.
  @param adaptable Adaptable
  @param type Type
  @param <T> Type
  @return Adaption result (not null)
  @throws UnableToAdaptException if the adaption was not successful