@Test
public void testToCharBuffer() throws Exception {

	UnsyncCharArrayWriter unsyncCharArrayWriter =
		new UnsyncCharArrayWriter();
	char[] buffer = (char[])_bufferField.get(unsyncCharArrayWriter);
	unsyncCharArrayWriter.write("test1");
	CharBuffer charBuffer = unsyncCharArrayWriter.toCharBuffer();
	Assert.assertSame(buffer, charBuffer.array());
	Assert.assertEquals(0, charBuffer.position());
	Assert.assertEquals(5, charBuffer.limit());
	Assert.assertEquals("test1", charBuffer.toString());
}