package com.google.checkstyle.test.base;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.junit.BeforeClass;
import org.junit.Test;

import com.puppycrawl.tools.checkstyle.Checker;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;

public class ConfigValidationTest extends BaseCheckTestSupport {

    static ConfigurationBuilder builder;

    @BeforeClass
    public static void setConfigurationBuilder() throws CheckstyleException, IOException {
        builder = new ConfigurationBuilder(new File("src/it/"));
    }

    @Test
    public void testGoogleChecks() throws IOException, Exception {
        final Configuration checkerConfig = builder.config;
        final Checker c = new Checker();
        c.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
        c.configure(checkerConfig);
        c.addListener(new BriefLogger(stream));

        final List<File> files = builder.getFiles();
        
        //runs over all input files;
        //as severity level is "warning", no errors expected
        verify(c, files.toArray(new File[files.size()]), "", new String[0], null);
    }
}

@@ -112,38 +112,8 @@
 t;%0A%0A
-import org.junit.BeforeClass;%0A
 impo
@@ -184,72 +184,8 @@
 er;%0A
-import com.puppycrawl.tools.checkstyle.api.CheckstyleException;%0A
 impo
@@ -308,134 +308,62 @@
 t %7B%0A
-%0A    static ConfigurationBuilder builder;%0A%0A    @BeforeClass%0A    public static void setConfigurationBuilder() throws Checkstyle
+    @Test%0A    public void testGoogleChecks() throws IO
 Exce
@@ -369,18 +369,16 @@
 eption, 
-IO
 Exceptio
@@ -389,16 +389,37 @@
         
+ConfigurationBuilder 
 builder 
@@ -471,92 +471,8 @@
 ));%0A
-    %7D%0A%0A    @Test%0A    public void testGoogleChecks() throws IOException, Exception %7B%0A
     

Remove non-final static field. #1555