Static imports come first.
MODIFY
src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
*/
package org.apache.commons.io.filefilter;
-import org.junit.Before;
-
import java.util.ArrayList;
import java.util.List;
+import org.junit.Before;
+
public class AndFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
private static final String DEFAULT_WORKING_PATH = "./AndFileFilterTestCase/";

MODIFY
src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
*/
package org.apache.commons.io.filefilter;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
public abstract class ConditionalFileFilterAbstractTestCase extends IOFileFilterAbstractTestCase {

MODIFY
src/test/java/org/apache/commons/io/filefilter/IOFileFilterAbstractTestCase.java
src/test/java/org/apache/commons/io/filefilter/IOFileFilterAbstractTestCase.java
*/
package org.apache.commons.io.filefilter;
-import java.io.File;
-
import static org.junit.Assert.assertEquals;
+import java.io.File;
+
public abstract class IOFileFilterAbstractTestCase {
public static void assertFileFiltering(final int testNumber, final IOFileFilter filter, final File file, final boolean expected)

MODIFY
src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
*/
package org.apache.commons.io.filefilter;
-import org.junit.Before;
-
import java.util.ArrayList;
import java.util.List;
+import org.junit.Before;
+
public class OrFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
private static final String DEFAULT_WORKING_PATH = "./OrFileFilterTestCase/";

MODIFY
src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
*/
package org.apache.commons.io.filefilter;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
import java.io.File;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOCase;
-import org.apache.commons.io.testtools.FileBasedTestCase;
import org.junit.After;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import org.junit.rules.TemporaryFolder;
/**
* Used to test RegexFileFilterUtils.
*/
-public class RegexFileFilterTestCase extends FileBasedTestCase {
+public class RegexFileFilterTestCase {
+
+ @ClassRule
+ public static TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+ private static File getTestDirectory() {
+ return temporaryFolder.getRoot();
+ }
@Before
public void setUp() {

Static imports come first.