@Test
public void testDuplicate() {

	Map<String, String> properties = new HashMap<>();
	Schema keySchema = Schema.create(Schema.Type.STRING);
	Schema valueSchema = Schema.create(Schema.Type.STRING);
	properties.put(AvroKeyValueSinkWriter.CONF_OUTPUT_KEY_SCHEMA, keySchema.toString());
	properties.put(AvroKeyValueSinkWriter.CONF_OUTPUT_VALUE_SCHEMA, valueSchema.toString());
	properties.put(AvroKeyValueSinkWriter.CONF_COMPRESS, String.valueOf(true));
	properties.put(AvroKeyValueSinkWriter.CONF_COMPRESS_CODEC, DataFileConstants.SNAPPY_CODEC);
	AvroKeyValueSinkWriter<String, String> writer = new AvroKeyValueSinkWriter(properties);
	writer.setSyncOnFlush(true);
	Writer<Tuple2<String, String>> other = writer.duplicate();
	assertTrue(writer.equals(other));
	writer.setSyncOnFlush(false);
	assertFalse(writer.equals(other));
}