Unfortunately close throws
MODIFY
src/test/java/org/apache/commons/io/output/ProxyCollectionWriterTest.java
src/test/java/org/apache/commons/io/output/ProxyCollectionWriterTest.java
package org.apache.commons.io.output;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -51,7 +50,6 @@ public void testArrayIOExceptionOnAppendChar1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -68,7 +66,6 @@ public void testArrayIOExceptionOnAppendChar2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -85,7 +82,6 @@ public void testArrayIOExceptionOnAppendCharSequence1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -102,7 +98,6 @@ public void testArrayIOExceptionOnAppendCharSequence2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -119,7 +114,6 @@ public void testArrayIOExceptionOnAppendCharSequenceIntInt1() throws IOException
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -136,7 +130,6 @@ public void testArrayIOExceptionOnAppendCharSequenceIntInt2() throws IOException
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -152,7 +145,6 @@ public void testArrayIOExceptionOnClose1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -168,7 +160,6 @@ public void testArrayIOExceptionOnClose2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -184,7 +175,6 @@ public void testArrayIOExceptionOnFlush1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -200,7 +190,6 @@ public void testArrayIOExceptionOnFlush2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -217,7 +206,6 @@ public void testArrayIOExceptionOnWriteCharArray1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -234,7 +222,6 @@ public void testArrayIOExceptionOnWriteCharArray2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -251,7 +238,6 @@ public void testArrayIOExceptionOnWriteCharArrayIntInt1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -268,7 +254,6 @@ public void testArrayIOExceptionOnWriteCharArrayIntInt2() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -285,7 +270,6 @@ public void testArrayIOExceptionOnWriteInt1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -302,7 +286,6 @@ public void testArrayIOExceptionOnWriteInt2() throws IOException {
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -319,7 +302,6 @@ public void testArrayIOExceptionOnWriteString1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -337,7 +319,6 @@ public void testArrayIOExceptionOnWriteString2() throws IOException {
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -354,7 +335,6 @@ public void testArrayIOExceptionOnWriteStringIntInt1() throws IOException {
assertEquals(1, e.getCauseList().size());
assertEquals(0, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -372,7 +352,6 @@ public void testArrayIOExceptionOnWriteStringIntInt2() throws IOException {
assertEquals(1, e.getCause(0, IOIndexedException.class).getIndex());
}
- tw.close();
}
@Test
@@ -403,7 +382,6 @@ public void testConstructorsNull() throws IOException {
teeWriter.append('a');
teeWriter.flush();
}
- assertTrue(true, "Test succeeded"); // need at least one assertion
}
@Test

Unfortunately close throws