RuleExecutorContainer { protected void addDefaultRuleExecutors() { setCustomRuleExecutor("alphabetic", new AlphabeticRuleExecutor()); setCustomRuleExecutor("alphanumeric", new AlphanumericRuleExecutor()); setCustomRuleExecutor("email", new EmailRuleExecutor()); setCustomRuleExecutor("maxLength", new MaxLengthRuleExecutor()); setCustomRuleExecutor("minLength", new MinLengthRuleExecutor()); setCustomRuleExecutor("exactLength", new ExactLengthRuleExecutor()); setCustomRuleExecutor("numeric", new NumericRuleExecutor()); setCustomRuleExecutor("required", new RequiredRuleExecutor()); setCustomRuleExecutor("notEmpty", new RequiredRuleExecutor()); setCustomRuleExecutor("matches", new MatchesRuleExecutor()); }  @PostConstruct void registerRuleExecutors(); void setCustomRuleExecutors(Map<String, RuleExecutor<?, ?>> customRuleExecutors); void setCustomRuleExecutor(String executorName, RuleExecutor<?, ?> ruleExecutor); RuleExecutor<?, ?> getRuleExecutorByName(String executorName); void setAddDefaultRuleExecutors(boolean addDefaultRuleExecutors); void setRuleExecutorBeanRegistrants(List<KeyedBeanRegistrant> registrants);  }
@Test public void testAddDefaultRuleExecutors() { executorContainer.registerRuleExecutors(); assertNotNull(executorContainer.getRuleExecutorByName("required")); }