String template = "Hello World!";
String text = "Hello World!\nHello World!\rHello World!\n\rHello World!\nHello World!\n";
Stream stream = new Stream();
stream.writeBit(1);
stream.write(text.getBytes(Charset.forName("ascii")));
stream.writeBit(1);
stream.readBit();
for (int i = 0; i < 5; i++) {
assertEquals(template, stream.readLine());