@Test
  void delete() {
    WriteResult result = repository.delete(person.id.is("__missing__"));
    check(result.insertedCount().getAsLong()).is(0L);
    check(result.deletedCount().getAsLong()).is(0L);
    check(result.updatedCount().getAsLong()).is(0L);
    check(result.totalCount().getAsLong()).is(0L);

    Person person1 = generator.next();
    repository.insert(person1);
    WriteResult result2 = repository.delete(person.id.is(person1.id()));
    check(result2.deletedCount().getAsLong()).is(1L);
  }
Validate results of a mongo write operation with {@link WriteResult}.
criteria/mongo/test/org/immutables/criteria/mongo/MongoWriteResultTest.java