// if the stream ends with \r we should simply add the \n
os.write("A line with incomplete ending\r".getBytes());
os.flush();
// no need to check this: this is an implementation detail
// assertEquals("Test\r\nA line with incomplete ending\r",bOut.toString());
os.checkCRLFTerminator();
os.flush();
assertEquals("Test\r\nA line with incomplete ending\r\n",bOut.toString());
// already correctly terminated, should leave the output untouched
os.checkCRLFTerminator();
os.flush();