@Test
  protected void empty() {
    values(string.value.isEmpty()).isEmpty();
    values(string.value.notEmpty()).isEmpty();

    repository.insert(generator.get().withValue("a"));
    values(string.value.isEmpty()).isEmpty();
    values(string.value.notEmpty()).hasContentInAnyOrder("a");

    repository.insert(generator.get().withValue(""));
    values(string.value.isEmpty()).hasContentInAnyOrder("");
    values(string.value.notEmpty()).hasContentInAnyOrder("a");

    repository.insert(generator.get().withValue(" "));
    values(string.value.isEmpty()).hasContentInAnyOrder("");
    values(string.value.notEmpty()).hasContentInAnyOrder("a", " ");

    repository.insert(generator.get().withValue("\n"));
    values(string.value.isEmpty()).hasContentInAnyOrder("");
    values(string.value.notEmpty()).hasContentInAnyOrder("a", " ", "\n");

    repository.insert(generator.get().withValue(""));
    values(string.value.isEmpty()).hasContentInAnyOrder("", "");
  }
Testing various string operations prefix/suffix/length etc.
criteria/common/test/org/immutables/criteria/typemodel/StringTemplate.java