@Test
public void shouldSerializeDataProperly() {

    ByteArrayOutputStream out = new ByteArrayOutputStream(ONE_KILO);
    ChunkedPrintWriter printWriter = new ChunkedPrintWriter(out);
    printWriter.print("Wiki");
    printWriter.print("pedia");
    printWriter.print(" in\r\n\r\nchunks.");
    printWriter.writeEnd();
    printWriter.flush();
    assertThat(new String(out.toByteArray()), is("4\r\nWiki\r\n5\r\npedia\r\nE\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n"));
}