@Test
public void testClose() {

	AtomicBoolean calledClose = new AtomicBoolean();
	UnsyncPrintWriter unsyncPrintWriter = new UnsyncPrintWriter(
		new StringWriter() {
			@Override
			public void close() {
				calledClose.set(true);
			}
		});
	unsyncPrintWriter.close();
	Assert.assertTrue(calledClose.get());
	calledClose.set(false);
	unsyncPrintWriter.close();
	Assert.assertFalse(calledClose.get());
	unsyncPrintWriter.reset(
		new StringWriter() {
			@Override
			public void close() throws IOException {
				throw new IOException();
			}
		});
	unsyncPrintWriter.close();
	Assert.assertTrue(unsyncPrintWriter.checkError());
}