anchor.diff:    }, skip: true);
   
     group('Safe mode tests:', () {
  +    setUp(() async {
  +      await initializeDatabase();
  +    });
  +
  +    tearDown(() async {
  +      await cleanupDatabase();
  +    });
  +
       test('testSafeModeUpdate', testSafeModeUpdate);
     }, skip: true);
   
     group('Indexes tests:', () {
  +    setUp(() async {
  +      await initializeDatabase();
  +    });
  +
  +    tearDown(() async {
  +      await cleanupDatabase();
  +    });
  +
       test('testGetIndexes', testGetIndexes);
       test('testIndexCreation', testIndexCreation);
       test('testEnsureIndexWithIndexCreation', testEnsureIndexWithIndexCreation);
  
positive.code:   expect(indexes.length, 1);
  }
  
  Future testIndexCreation() async {
    for (int n = 0; n < 6; n++) {
      await collection.insert({
        'a': n,
        'embedded': {'b': n, 'c': n * 10}
      });
    }
    var res = await db.createIndex('testcol', key: 'a');
    expect(res['ok'], 1.0);
  
    res = await db.createIndex('testcol', keys: {'a': -1, 'embedded.c': 1});
    expect(res['ok'], 1.0);
  
    var indexes = await collection.getIndexes();
    expect(indexes.length, 3);
  
    res = await db.ensureIndex('testcol', keys: {'a': -1, 'embedded.c': 1});
    expect(res['ok'], 1.0);
  }
  
  Future testEnsureIndexWithIndexCreation() {
    Db db = new Db('${DefaultUri}ensureIndex_indexCreation');
    DbCollection collection;
    return db.open().then((c) {
      collection = db.collection('testcol');
      return collection.drop();
    }).then((res) {
      for (int n = 0; n < 6; n++) {
        collection.insert({
          'a': n,
          'embedded': {'b': n, 'c': n * 10}
        });
      }
      return db.ensureIndex('testcol', keys: {'a': -1, 'embedded.c': 1});
    }).then((res) {
      expect(res['ok'], 1.0);
      expect(res['err'], isNull);
      return db.close();
    });
  }
  
  Future testIndexCreationErrorHandling() {
    Db db = new Db('${DefaultUri}IndexCreationErrorHandling');
    DbCollection collection;
    bool errorHandled = false;
    return db.open().then((c) {
      collection = db.collection('testcol');
      return collection.drop();
    }).then((res) {
      for (int n = 0; n < 6; n++) {
        collection.insert({'a': n});
      }
      // Insert dublicate
      collection.insert({'a': 3});
      return db.ensureIndex('testcol', key: 'a', unique: true).catchError((e) {
        errorHandled = true;
      });
    }).then((res) {
      expect(errorHandled, isTrue);
      return db.close();
    });
  }
  
  Future testSafeModeUpdate() {
    Db db = new Db('${DefaultUri}safe_mode');
    DbCollection collection = db.collection('testcol');
    return db.open().then((c) {
      collection.remove();
      for (int n = 0; n < 6; n++) {
        collection.insert({
          'a': n,
          'embedded': {'b': n, 'c': n * 10}
        });
      }
      return collection.update({'a': 200}, {'a': 100});
    }).then((res) {
      expect(res['updatedExisting'], false);
      expect(res['n'], 0);
      return collection.update({'a': 3}, {'a': 100});
    }).then((res) {
      expect(res['updatedExisting'], true);
      expect(res['n'], 1);
      return db.close();
    });
  }
  
  Future testFindWithFieldsClause() async {
  
negative.code:     test('testCursorWithOpenServerCursor', testCursorWithOpenServerCursor);
      test('testCursorGetMore', testCursorGetMore);
      test('testFindStream', testFindStream);
    }, skip: true);
  
    group('DBCommand tests:', () {
      setUp(() async {
  