public Predicate getRetryWhilePolicy(CamelContext context) {
    Predicate answer = getRetryWhile();

    if (getRetryWhileRef() != null) {
      // its a bean expression
      Language bean = context.resolveLanguage("bean");
      answer = bean.createPredicate(getRetryWhileRef());
    }

    return answer;
  }
 /** Asserts that the language name can be resolved */
 protected Language assertResolveLanguage(String languageName) {
   Language language = context.resolveLanguage(languageName);
   assertNotNull("No language found for name: " + languageName, language);
   return language;
 }