use of com.fasterxml.jackson.core.util.BufferRecycler in project jackson-core by FasterXML.
the class UTF8DataInputJsonParserTest method testNextTextValueThrowsIOException.
@Test
public void testNextTextValueThrowsIOException() {
IOContext ioContext = new IOContext(new BufferRecycler(), this, false);
byte[] byteArray = new byte[20];
byteArray[0] = (byte) 47;
InputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
DataInputStream dataInputStream = new DataInputStream(byteArrayInputStream);
UTF8DataInputJsonParser uTF8DataInputJsonParser = new UTF8DataInputJsonParser(ObjectReadContext.empty(), ioContext, 915, dataInputStream, null, (byte) 47);
try {
uTF8DataInputJsonParser.nextTextValue();
fail("Expecting exception: IOException");
} catch (IOException e) {
assertEquals(JsonParser.class.getName(), e.getStackTrace()[0].getClassName());
}
}
Aggregations