Skip to content

Commit fcc43a6

Browse files
committed
Add org.apache.commons.io.input.AutoCloseInputStreamTest.testBuilderGet()
1 parent 7081079 commit fcc43a6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import static org.junit.jupiter.api.Assertions.assertEquals;
2020
import static org.junit.jupiter.api.Assertions.assertFalse;
2121
import static org.junit.jupiter.api.Assertions.assertTrue;
22+
import static org.junit.jupiter.api.Assertions.assertThrows;
2223

2324
import java.io.ByteArrayInputStream;
2425
import java.io.IOException;
@@ -49,6 +50,12 @@ public void close() {
4950
closed = false;
5051
}
5152

53+
@Test
54+
public void testBuilderGet() {
55+
// java.lang.IllegalStateException: origin == null
56+
assertThrows(IllegalStateException.class, () -> AutoCloseInputStream.builder().get());
57+
}
58+
5259
@Test
5360
public void testClose() throws IOException {
5461
stream.close();

0 commit comments

Comments
 (0)