Placeholders { public static boolean containsAnyPlaceholder(final CharSequence input) { requireNonNull(input); return containsPlaceholder(input) || containsLegacyPlaceholder(input); } private  Placeholders(); static Pattern pattern(); static List<String> groupNames(); static boolean containsAnyPlaceholder(final CharSequence input);  }
@Test public void containsReturnsTrueWhenInputContainsPlaceholder() { final String input = "a" + REPLACER_1 + "z"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isTrue(); }
@Test public void containsReturnsTrueWhenInputContainsLegacyPlaceholder() { final String input = "a" + LEGACY_REPLACER + "z"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isTrue(); }
@Test public void containsReturnsTrueWhenInputContainsBothNewAndLegacyPlaceholders() { final String input = "a" + REPLACER_1 + "b" + LEGACY_REPLACER + "c"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isTrue(); }
@Test public void containsReturnsFalseWhenInputContainsPlaceholderStartOnly() { final String input = "a{{z"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isFalse(); }
@Test public void containsReturnsFalseWhenInputContainsPlaceholderEndOnly() { final String input = "a}}z"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isFalse(); }
@Test public void containsReturnsFailsWhenInputDoesNotContainAnyPlaceholder() { final String input = "abc"; final boolean contains = Placeholders.containsAnyPlaceholder(input); assertThat(contains).isFalse(); }