File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/io/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ protected T createFixture() throws IOException {
8282 return (T ) new ProxyInputStreamFixture (createOriginInputStream ());
8383 }
8484
85+ @ SuppressWarnings ("unchecked" )
86+ protected T createFixture (final InputStream proxy ) {
87+ return (T ) new ProxyInputStreamFixture (proxy );
88+ }
89+
8590 protected InputStream createOriginInputStream () {
8691 return CharSequenceInputStream .builder ().setCharSequence ("abc" ).get ();
8792 }
@@ -114,7 +119,7 @@ public void testAvailableAll() throws IOException {
114119
115120 @ Test
116121 public void testAvailableNull () throws IOException {
117- try (ProxyInputStreamFixture inputStream = new ProxyInputStreamFixture (null )) {
122+ try (T inputStream = createFixture (null )) {
118123 assertEquals (0 , inputStream .available ());
119124 inputStream .setIn (createFixture ());
120125 assertEquals (3 , inputStream .available ());
You can’t perform that action at this time.
0 commit comments