### Question:
PredicateUtils { static String getTagLikeString(@NotNull final Set<String> tags) { final StringBuilder builder = new StringBuilder(); tags.stream() .filter(StringUtils::isNotBlank) .sorted(String.CASE_INSENSITIVE_ORDER) .forEach( tag -> builder .append(PERCENT) .append(TAG_DELIMITER) .append(tag) .append(TAG_DELIMITER) ); return builder.append(PERCENT).toString(); } private  PredicateUtils(); static String createTagSearchString(final Set<TagEntity> tags);  }### Answer:
@Test void canGetTagLikeString() { Assertions .assertThat(PredicateUtils.getTagLikeString(Sets.newHashSet())) .isEqualTo( PredicateUtils.PERCENT ); Assertions .assertThat(PredicateUtils.getTagLikeString(Sets.newHashSet("tag"))) .isEqualTo( PredicateUtils.PERCENT + PredicateUtils.TAG_DELIMITER + "tag" + PredicateUtils.TAG_DELIMITER + PredicateUtils.PERCENT ); Assertions .assertThat(PredicateUtils.getTagLikeString(Sets.newHashSet("tag", "Stag", "rag"))) .isEqualTo( PredicateUtils.PERCENT + PredicateUtils.TAG_DELIMITER + "rag" + PredicateUtils.TAG_DELIMITER + "%" + PredicateUtils.TAG_DELIMITER + "Stag" + PredicateUtils.TAG_DELIMITER + "%" + PredicateUtils.TAG_DELIMITER + "tag" + PredicateUtils.TAG_DELIMITER + PredicateUtils.PERCENT ); }