@Test
  public void delete() throws Exception {
    Item item = item();

    repository.insert(item).getUnchecked();

    // expect single entry to be deleted
    check(repository.findAll().deleteAll().getUnchecked()).is(1);
    // second time no entries remaining
    check(repository.findAll().deleteAll().getUnchecked()).is(0);
  }
Basic CRUD operations on the top of repository
mongo/test/org/immutables/mongo/fixture/BasicMongoOperationsTest.java