From b244c9f32001af917867607235276eeba6aa106b Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Tue, 6 Dec 2022 22:48:06 +0100 Subject: [PATCH] fix testFromEmptyByteBufferWithoutReleaser Signed-off-by: Ludovic Orban --- .../src/test/java/org/eclipse/jetty/io/ContentTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentTest.java b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentTest.java index 2d58ffa915c..a09d6e1fb90 100644 --- a/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentTest.java +++ b/jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentTest.java @@ -23,15 +23,14 @@ import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.sameInstance; -import static org.junit.jupiter.api.Assertions.assertThrows; public class ContentTest { @Test public void testFromEmptyByteBufferWithoutReleaser() { - assertThrows(IllegalArgumentException.class, () -> Content.Chunk.from(ByteBuffer.wrap(new byte[0]), true)); - assertThrows(IllegalArgumentException.class, () -> Content.Chunk.from(ByteBuffer.wrap(new byte[0]), false)); + assertThat(Content.Chunk.from(ByteBuffer.wrap(new byte[0]), true), sameInstance(Content.Chunk.EOF)); + assertThat(Content.Chunk.from(ByteBuffer.wrap(new byte[0]), false), sameInstance(Content.Chunk.EMPTY)); } @Test