@Test
  @SuppressWarnings("deprecation")
  public void testGetWriteConcern() {
    MongoOptions options = new MongoOptions();
    assertEquals(WriteConcern.NORMAL, options.getWriteConcern());

    options.reset();
    options.safe = true;
    assertEquals(WriteConcern.SAFE, options.getWriteConcern());

    options.reset();
    options.w = 3;
    assertEquals(new WriteConcern(3), options.getWriteConcern());

    options.reset();
    options.wtimeout = 3000;
    assertEquals(
        WriteConcern.ACKNOWLEDGED.withWTimeout(3000, TimeUnit.MILLISECONDS),
        options.getWriteConcern());

    options.reset();
    options.fsync = true;
    assertEquals(WriteConcern.ACKNOWLEDGED.withFsync(true), options.getWriteConcern());

    options.reset();
    options.j = true;
    assertEquals(WriteConcern.ACKNOWLEDGED.withJournal(true), options.getWriteConcern());
  }
 public MongoOptions() {
   reset();
 }