@Test public void should_Write_Exactly_What_Was_Read() throws IOException { String json = "{}"; ByteArrayInputStream input = new ByteArrayInputStream(json.getBytes()); ByteArrayOutputStream output = new ByteArrayOutputStream(); underTest.readAndWrite(input, output); assertThat(json, equalTo(new String(output.toByteArray()))); json = "{\"_id\":\"simple\",\"name\":\"simple\",\"description\":\"simplestuff\"}"; input = new ByteArrayInputStream(json.getBytes()); output = new ByteArrayOutputStream(); underTest.readAndWrite(input, output); assertThat(json, equalTo(new String(output.toByteArray()))); }
public StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output) throws IOException { objectMapper.readAndWrite(input, output); return this; }
StreamingObjectMapper { public StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output) throws IOException { objectMapper.readAndWrite(input, output); return this; } }
StreamingObjectMapper { public StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output) throws IOException { objectMapper.readAndWrite(input, output); return this; }  }
StreamingObjectMapper { public StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output) throws IOException { objectMapper.readAndWrite(input, output); return this; }  StreamingObjectMapper configure(final SerializationFeature feature, final boolean state); StreamingObjectMapper disable(final JsonGenerator.Feature... feature); boolean isEnabled(final SerializationFeature feature); StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output); }
StreamingObjectMapper { public StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output) throws IOException { objectMapper.readAndWrite(input, output); return this; }  StreamingObjectMapper configure(final SerializationFeature feature, final boolean state); StreamingObjectMapper disable(final JsonGenerator.Feature... feature); boolean isEnabled(final SerializationFeature feature); StreamingObjectMapper readAndWrite(final InputStream input, final OutputStream output);  }