@Test
public void testDuplicate() {

	StringWriter<String> writer = new StringWriter(StandardCharsets.UTF_16.name());
	writer.setSyncOnFlush(true);
	Writer<String> other = writer.duplicate();
	assertTrue(writer.equals(other));
	writer.setSyncOnFlush(false);
	assertFalse(writer.equals(other));
	assertFalse(writer.equals(new StringWriter<>()));
}