@Test
  void equality() {
    BigDecimal zero = BigDecimal.ZERO;
    BigDecimal one = BigDecimal.ONE;
    BigDecimal two = BigDecimal.valueOf(2);
    repository.insert(generator.get().withId("id0").withValue(zero));
    repository.insert(generator.get().withId("id1").withValue(one));
    repository.insert(generator.get().withId("id2").withValue(two));

    ids(criteria.value.is(zero)).hasContentInAnyOrder("id0");
    ids(criteria.value.isNot(zero)).hasContentInAnyOrder("id1", "id2");
    ids(criteria.value.isNot(one)).hasContentInAnyOrder("id0", "id2");
    ids(criteria.value.is(one)).hasContentInAnyOrder("id1");
    ids(criteria.value.is(two)).hasContentInAnyOrder("id2");
    ids(criteria.value.is(BigDecimal.valueOf(42))).isEmpty();
    ids(criteria.value.in(zero, one)).hasContentInAnyOrder("id0", "id1");
    ids(criteria.value.in(zero, two)).hasContentInAnyOrder("id0", "id2");
    ids(criteria.value.notIn(zero, one, two)).isEmpty();
  }
Testing various string operations prefix/suffix/length etc.
criteria/common/test/org/immutables/criteria/typemodel/BigDecimalTemplate.java