@Test
public void testConstructor() {

	DummyOutputStream dummyOutputStream = new DummyOutputStream();
	OutputStreamWriter outputStreamWriter = new OutputStreamWriter(
		dummyOutputStream);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(
		StringPool.DEFAULT_CHARSET_NAME, outputStreamWriter.getEncoding());
	Assert.assertEquals(
		_getDefaultOutputBufferSize(),
		_getOutputBufferSize(outputStreamWriter));
	Assert.assertFalse(_isAutoFlush(outputStreamWriter));
	outputStreamWriter = new OutputStreamWriter(dummyOutputStream, null);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(
		StringPool.DEFAULT_CHARSET_NAME, outputStreamWriter.getEncoding());
	Assert.assertEquals(
		_getDefaultOutputBufferSize(),
		_getOutputBufferSize(outputStreamWriter));
	Assert.assertFalse(_isAutoFlush(outputStreamWriter));
	String encoding = "US-ASCII";
	outputStreamWriter = new OutputStreamWriter(
		dummyOutputStream, encoding);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(encoding, outputStreamWriter.getEncoding());
	Assert.assertEquals(
		_getDefaultOutputBufferSize(),
		_getOutputBufferSize(outputStreamWriter));
	Assert.assertFalse(_isAutoFlush(outputStreamWriter));
	outputStreamWriter = new OutputStreamWriter(
		dummyOutputStream, encoding, true);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(encoding, outputStreamWriter.getEncoding());
	Assert.assertEquals(
		_getDefaultOutputBufferSize(),
		_getOutputBufferSize(outputStreamWriter));
	Assert.assertTrue(_isAutoFlush(outputStreamWriter));
	outputStreamWriter = new OutputStreamWriter(
		dummyOutputStream, encoding, 32);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(encoding, outputStreamWriter.getEncoding());
	Assert.assertEquals(2, _getInputCharBufferSize(outputStreamWriter));
	Assert.assertEquals(32, _getOutputBufferSize(outputStreamWriter));
	Assert.assertFalse(_isAutoFlush(outputStreamWriter));
	outputStreamWriter = new OutputStreamWriter(
		dummyOutputStream, encoding, 32, true);
	Assert.assertSame(
		dummyOutputStream, _getOutputStream(outputStreamWriter));
	Assert.assertSame(encoding, outputStreamWriter.getEncoding());
	Assert.assertEquals(2, _getInputCharBufferSize(outputStreamWriter));
	Assert.assertEquals(32, _getOutputBufferSize(outputStreamWriter));
	Assert.assertTrue(_isAutoFlush(outputStreamWriter));
	try {
		new OutputStreamWriter(dummyOutputStream, encoding, 3, true);
		Assert.fail();
	}
	catch (IllegalArgumentException illegalArgumentException) {
		Assert.assertEquals(
			"Output buffer size 3 is less than 4",
			illegalArgumentException.getMessage());
	}
}