@Test
  public void setWithOtherOperations() throws Exception {
    String id = "i1";

    ImmutableItem item = ImmutableItem.builder().id(id).addList("l1").build();

    check(repository.upsert(item).getUnchecked()).is(1);

    repository.update(repository.criteria().id(id))
        .setTags(Collections.singleton(ImmutableTag.of("t1")))
        .setList(Collections.singleton("l1"))
        .setIds(Collections.singleton(Id.fromString(new ObjectId().toString())))
        .updateFirst()
        .getUnchecked();

    Item item2 = findById(id);

    check(item2.list()).hasAll("l1");
    check(item2.tags()).hasAll(ImmutableTag.of("t1"));
    check(item2.ids()).hasSize(1);
  }
Checks that number of updated documents is correct (see {@link com.mongodb.WriteResult})
mongo/test/org/immutables/mongo/fixture/SimpleUpdaterTest.java