diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/HeaderChannelBufferTest.java b/src/test/java/org/apache/commons/compress/archivers/sevenz/HeaderChannelBufferTest.java index 7f480417e44..1780582d49b 100644 --- a/src/test/java/org/apache/commons/compress/archivers/sevenz/HeaderChannelBufferTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/HeaderChannelBufferTest.java @@ -42,6 +42,13 @@ public void testPagedArrayTransfer() throws Exception { assertArrayEquals(data, output); } + @Test + public void testNoMaxPageSize() throws Exception { + SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(new byte[50]); + HeaderBuffer headerBuffer = HeaderChannelBuffer.create(channel, 50); + assertTrue(headerBuffer.hasCRC()); + } + @Test public void testGetElementsFromPagedChannel() throws Exception { byte[] data = {(byte) 255, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8};