@Test
public void testNewLine() throws Exception {

	StringWriter stringWriter = new StringWriter();
	UnsyncBufferedWriter unsyncBufferedWriter = new UnsyncBufferedWriter(
		stringWriter, 10);
	unsyncBufferedWriter.newLine();
	String lineSeparator = System.getProperty("line.separator");
	Assert.assertEquals(
		lineSeparator.length(), _countField.getInt(unsyncBufferedWriter));
	unsyncBufferedWriter.write('a');
	Assert.assertEquals(
		lineSeparator.length() + 1,
		_countField.getInt(unsyncBufferedWriter));
	unsyncBufferedWriter.newLine();
	Assert.assertEquals(
		(lineSeparator.length() * 2) + 1,
		_countField.getInt(unsyncBufferedWriter));
	unsyncBufferedWriter.flush();
	Assert.assertEquals(
		lineSeparator + "a" + lineSeparator, stringWriter.toString());
}