@Test
  protected void contains() {
    values(string.value.contains("")).isEmpty();
    values(string.value.contains(" ")).isEmpty();
    values(string.value.contains("aa")).isEmpty();
    repository.insert(generator.get().withValue("a"));
    values(string.value.contains("a")).hasContentInAnyOrder("a");
    values(string.value.contains("b")).isEmpty();
    values(string.value.contains("")).hasContentInAnyOrder("a");
    repository.insert(generator.get().withValue("b"));
    values(string.value.contains("a")).hasContentInAnyOrder("a");
    values(string.value.contains("b")).hasContentInAnyOrder("b");

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