protected DefaultConfiguration createCheckerConfig(Configuration config) {
   final DefaultConfiguration dc = new DefaultConfiguration("configuration");
   final DefaultConfiguration twConf = createCheckConfig(TreeWalker.class);
   // make sure that the tests always run with this charset
   dc.addAttribute("charset", "iso-8859-1");
   dc.addChild(twConf);
   twConf.addChild(config);
   return dc;
 }
 @Override
 protected Checker createChecker(Configuration aFilterConfig) throws CheckstyleException {
   final DefaultConfiguration checkerConfig = new DefaultConfiguration("configuration");
   final DefaultConfiguration checksConfig = createCheckConfig(TreeWalker.class);
   checksConfig.addChild(createCheckConfig(FileContentsHolder.class));
   checksConfig.addChild(createCheckConfig(MemberNameCheck.class));
   checksConfig.addChild(createCheckConfig(ConstantNameCheck.class));
   checksConfig.addChild(createCheckConfig(IllegalCatchCheck.class));
   checkerConfig.addChild(checksConfig);
   if (aFilterConfig != null) {
     checkerConfig.addChild(aFilterConfig);
   }
   final Checker checker = new Checker();
   final Locale locale = Locale.ENGLISH;
   checker.setLocaleCountry(locale.getCountry());
   checker.setLocaleLanguage(locale.getLanguage());
   checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
   checker.configure(checkerConfig);
   checker.addListener(new BriefLogger(mStream));
   return checker;
 }
 @Override
 protected DefaultConfiguration createCheckerConfig(Configuration aConfig) {
   final DefaultConfiguration dc = new DefaultConfiguration("root");
   dc.addChild(aConfig);
   return dc;
 }