Skip to content

Commit

Permalink
CharBuffer is a sealed class in Java 21 so can't be mocked (close #442)
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-tremblay committed Aug 18, 2023
1 parent 2e05d19 commit 15f52d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test-nodeps/src/test/java/org/itests/NoDepsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.nio.CharBuffer;
import java.io.PrintStream;

import static org.easymock.EasyMock.*;

Expand All @@ -36,8 +36,8 @@ public void interfaceMocking() throws Exception {

@Test
public void classMocking() throws Exception {
CharBuffer buffer =mock(CharBuffer.class);
test(buffer);
PrintStream stream = mock(PrintStream.class);
test(stream);
}

private void test(Appendable appendable) throws IOException {
Expand Down

0 comments on commit 15f52d8

Please sign in to comment.