private static boolean isAllowedByFreeLicense() {
    return Optional.ofNullable(ApplicationManager.getApplication())
      .map(application -> application.getService(ConsentOptionsProvider.class))
      .map(provider -> provider.isActivatedWithFreeLicense())
      .orElse(false);
  }
private static boolean isAllowedByFreeLicense()