@Test
void multilineWrapping() throws Exception
{

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    LineWrapperOutputStream lwos = new LineWrapperOutputStream(baos, 10);
    lwos.write("12345".getBytes());
    lwos.write("3456789012345678".getBytes(),3,10);
    lwos.write("6789012345".getBytes(),0,7);
    lwos.close();
    assertThat(baos.toString(), equalTo("1234567890" + NEWLINE + "1234567890" + NEWLINE + "12"));
}