### Question:
Substring { public static Suffix suffix(String suffix) { return new Suffix(requireNonNull(suffix)); } private  Substring(); static Prefix prefix(String prefix); static Prefix prefix(char prefix); static Suffix suffix(String suffix); static Suffix suffix(char suffix); static Pattern substring(String str); static Pattern first(String str); static Pattern first(char character); static Pattern first(java.util.regex.Pattern regexPattern); static Pattern first(java.util.regex.Pattern regexPattern, int group); static Pattern spanningInOrder(String stop1, String stop2, String... moreStops); static Pattern last(String str); static Pattern last(char character); static Pattern before(Pattern delimiter); static Pattern after(Pattern delimiter); static Pattern upToIncluding(Pattern pattern); static Pattern between(Pattern open, Pattern close); static final Pattern NONE; static final Pattern BEGINNING; static final Pattern END; }### Answer:
@Test public void suffix_toString() { assertThat(suffix("foo").toString()).isEqualTo("foo"); }
@Test public void suffix_noMatch() { assertThat(suffix("foo").in("foonot")).isEmpty(); assertThat(suffix("foo").in("")).isEmpty(); assertThat(suffix("foo").iterateIn("")).isEmpty(); }
@Test public void suffix_addToIfAbsent_absent() { assertThat(suffix(".").addToIfAbsent("a")).isEqualTo("a."); assertThat(suffix('.').addToIfAbsent("foo")).isEqualTo("foo."); }
@Test public void suffix_addToIfAbsent_present() { assertThat(suffix(".").addToIfAbsent("a.")).isEqualTo("a."); assertThat(suffix('.').addToIfAbsent("foo.")).isEqualTo("foo."); }
@Test public void charSuffix_toString() { assertThat(suffix('f').toString()).isEqualTo("f"); }
@Test public void charSuffix_noMatch() { assertThat(suffix('f').in("foo")).isEmpty(); assertThat(suffix('f').in("")).isEmpty(); assertThat(suffix('f').iterateIn("foo")).isEmpty(); assertThat(suffix('f').iterateIn("")).isEmpty(); }