Replace custom temporary folder management with JUnit's TemporaryFolder.
This will allow Maven to run tests concurrently. Clean up imports.
MODIFY
src/test/java/org/apache/commons/io/output/BrokenOutputStreamTest.java
src/test/java/org/apache/commons/io/output/BrokenOutputStreamTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.OutputStream;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
* JUnit Test Case for {@link BrokenOutputStream}.

MODIFY
src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
*/
package org.apache.commons.io.output;
-import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.fail;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
/**
* Basic unit tests for the alternative ByteArrayOutputStream implementation.

MODIFY
src/test/java/org/apache/commons/io/output/CloseShieldOutputStreamTest.java
src/test/java/org/apache/commons/io/output/CloseShieldOutputStreamTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.OutputStream;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
* JUnit Test Case for {@link CloseShieldOutputStream}.

MODIFY
src/test/java/org/apache/commons/io/output/ClosedOutputStreamTest.java
src/test/java/org/apache/commons/io/output/ClosedOutputStreamTest.java
*/
package org.apache.commons.io.output;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import org.junit.Test;
-import static org.junit.Assert.fail;
-
/**
* JUnit Test Case for {@link ClosedOutputStream}.
*/

MODIFY
src/test/java/org/apache/commons/io/output/CountingOutputStreamTest.java
src/test/java/org/apache/commons/io/output/CountingOutputStreamTest.java
package org.apache.commons.io.output;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.commons.io.input.NullInputStream;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
/**
* @version $Id$

MODIFY
src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
*/
package org.apache.commons.io.output;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.File;
import java.io.IOException;
import java.io.Writer;
import java.nio.charset.UnsupportedCharsetException;
import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.testtools.FileBasedTestCase;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.rules.TemporaryFolder;
/**
* Tests that files really lock, although no writing is done as
* the locking is tested only on construction.
*
*/
-public class LockableFileWriterTest extends FileBasedTestCase {
+public class LockableFileWriterTest {
+
+ @Rule
+ public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+ private File getTestDirectory() {
+ return temporaryFolder.getRoot();
+ }
private File file;
private File lockDir;

MODIFY
src/test/java/org/apache/commons/io/output/NullOutputStreamTest.java
src/test/java/org/apache/commons/io/output/NullOutputStreamTest.java
package org.apache.commons.io.output;
-import org.junit.Test;
-
import java.io.IOException;
+import org.junit.Test;
+
/**
* Really not a lot to do here, but checking that no

MODIFY
src/test/java/org/apache/commons/io/output/ProxyOutputStreamTest.java
src/test/java/org/apache/commons/io/output/ProxyOutputStreamTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.io.OutputStream;
-import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
/**
* JUnit Test Case for {@link CloseShieldOutputStream}.

MODIFY
src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
package org.apache.commons.io.output;
import static org.junit.Assert.assertEquals;
+
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

MODIFY
src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java
src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.Writer;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.fail;
+import org.junit.Test;
/**
* Test case for {@link StringBuilderWriter}.

MODIFY
src/test/java/org/apache/commons/io/output/TaggedOutputStreamTest.java
src/test/java/org/apache/commons/io/output/TaggedOutputStreamTest.java
*/
package org.apache.commons.io.output;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.OutputStream;
import java.util.UUID;
import org.apache.commons.io.TaggedIOException;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
/**
* JUnit Test Case for {@link TaggedOutputStream}.
*/

MODIFY
src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Assert;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import static org.junit.Assert.assertEquals;
+import org.junit.Assert;
+import org.junit.Test;
/**
* @version $Id$

MODIFY
src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java
src/test/java/org/apache/commons/io/output/ThresholdingOutputStreamTest.java
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.io.OutputStream;

MODIFY
src/test/java/org/apache/commons/io/output/WriterOutputStreamTest.java
src/test/java/org/apache/commons/io/output/WriterOutputStreamTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Random;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import org.junit.Test;
public class WriterOutputStreamTest {
private static final String TEST_STRING = "\u00e0 peine arriv\u00e9s nous entr\u00e2mes dans sa chambre";

MODIFY
src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
*/
package org.apache.commons.io.output;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Arrays;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
/**
* @version $Id$

Replace custom temporary folder management with JUnit's TemporaryFolder.
This will allow Maven to run tests concurrently. Clean up imports.