This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git

commit fbede3cdd14d1b775bae66bf3ac52b0a5dd5b26b
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jul 7 17:28:27 2024 -0400

    Rename test method
---
 .../commons/io/input/CircularInputStreamTest.java  | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/io/input/CircularInputStreamTest.java 
b/src/test/java/org/apache/commons/io/input/CircularInputStreamTest.java
index 50b975a33..282ad06ea 100644
--- a/src/test/java/org/apache/commons/io/input/CircularInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/CircularInputStreamTest.java
@@ -33,6 +33,20 @@ import org.junit.jupiter.api.Test;
  */
 public class CircularInputStreamTest {
 
+    private void assertStreamOutput(final byte[] toCycle, final byte[] 
expected) throws IOException {
+        final byte[] actual = new byte[expected.length];
+
+        try (InputStream infStream = createInputStream(toCycle, -1)) {
+            final int actualReadBytes = infStream.read(actual);
+            assertArrayEquals(expected, actual);
+            assertEquals(expected.length, actualReadBytes);
+        }
+    }
+
+    private InputStream createInputStream(final byte[] repeatContent, final 
long targetByteCount) {
+        return new CircularInputStream(repeatContent, targetByteCount);
+    }
+
     @SuppressWarnings("resource")
     @Test
     public void testAvailable() throws Exception {
@@ -46,7 +60,7 @@ public class CircularInputStreamTest {
 
     @SuppressWarnings("resource")
     @Test
-    public void testReadAfterClose() throws Exception {
+    public void testAvailableAfterClose() throws Exception {
         final InputStream shadow;
         try (InputStream in = createInputStream(new byte[] { 1, 2 }, 4)) {
             assertTrue(in.available() > 0);
@@ -59,20 +73,6 @@ public class CircularInputStreamTest {
         assertEquals(IOUtils.EOF, shadow.read());
     }
 
-    private void assertStreamOutput(final byte[] toCycle, final byte[] 
expected) throws IOException {
-        final byte[] actual = new byte[expected.length];
-
-        try (InputStream infStream = createInputStream(toCycle, -1)) {
-            final int actualReadBytes = infStream.read(actual);
-            assertArrayEquals(expected, actual);
-            assertEquals(expected.length, actualReadBytes);
-        }
-    }
-
-    private InputStream createInputStream(final byte[] repeatContent, final 
long targetByteCount) {
-        return new CircularInputStream(repeatContent, targetByteCount);
-    }
-
     @Test
     public void testContainsEofInputSize0() {
         assertThrows(IllegalArgumentException.class, () -> 
createInputStream(new byte[] { -1 }, 0));

Reply via email to