Skip to content

Commit fc6fd3e

Browse files
author
eugenp
committed
test added for java conversion
1 parent 0b03522 commit fc6fd3e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core-java/src/test/java/org/baeldung/java/io/JavaXToReaderUnitTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ public void givenUsingPlainJava_whenConvertingByteArrayIntoReader_thenCorrect()
6060
targetReader.close();
6161
}
6262

63+
@Test
64+
public void givenUsingPlainJava2_whenConvertingByteArrayIntoReader_thenCorrect() throws IOException {
65+
final byte[] initialArray = "Hello world!".getBytes();
66+
final Reader targetReader = new InputStreamReader(new ByteArrayInputStream(initialArray));
67+
68+
targetReader.close();
69+
}
70+
6371
@Test
6472
public void givenUsingGuava_whenConvertingByteArrayIntoReader_thenCorrect() throws IOException {
6573
final byte[] initialArray = "With Guava".getBytes();

0 commit comments

Comments
 (0)