@Test
  void comparison() {
    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.atMost(zero)).hasContentInAnyOrder("id0");
    ids(criteria.value.atLeast(zero)).hasContentInAnyOrder("id0", "id1", "id2");
    ids(criteria.value.atMost(two)).hasContentInAnyOrder("id0", "id1", "id2");
    ids(criteria.value.between(zero, two)).hasContentInAnyOrder("id0", "id1", "id2");
    ids(criteria.value.between(BigDecimal.valueOf(10), BigDecimal.valueOf(20))).isEmpty();
    ids(criteria.value.atMost(one)).hasContentInAnyOrder("id0", "id1");
    ids(criteria.value.atLeast(one)).hasContentInAnyOrder("id1", "id2");
    ids(criteria.value.atLeast(two)).hasContentInAnyOrder("id2");
    ids(criteria.value.atLeast(BigDecimal.valueOf(11))).isEmpty();
    ids(criteria.value.greaterThan(two)).isEmpty();
    ids(criteria.value.lessThan(zero)).isEmpty();
  }
Testing various string operations prefix/suffix/length etc.
criteria/common/test/org/immutables/criteria/typemodel/BigDecimalTemplate.java