code: public static ContextAwarePolicy createPolicy(Policy policy, PublicationsHandler handler, KSIExtendingService extendingService) {
          if(policy instanceof UserProvidedPublicationBasedVerificationPolicy){
              throw new IllegalArgumentException("Unsupported verification policy.");
          }
          Util.notNull(handler, "Publications handler");
          Util.notNull(extendingService, "Extending service");
          return new ContextAwarePolicyAdapter(policy, new PolicyContext(handler, extendingService));
      }
docs: Method creating context aware policy using user provided policy with needed components.
  
  @param policy
  Policy.
  @param handler
  Publications handler.
  @param extendingService
  Extender client.
  @return Policy with suitable context.