@SuppressWarnings("deprecation")
@Test
public void testCreateWriterOnExistingFile() throws IOException {

  Configuration conf = new Configuration();
  FileSystem fs = FileSystem.getLocal(conf);
  Path name = new Path(new Path(GenericTestUtils.getTempPath(
      "createWriterOnExistingFile")), "file");
  fs.create(name);
  SequenceFile.createWriter(fs, conf, name, RandomDatum.class,
      RandomDatum.class, 512, (short) 1, 4096, false,
      CompressionType.NONE, null, new Metadata());
}