### Question:
SolrCriterionTransformer { public String transformToEqualsCriteria(F field, List<String> values, Operator operator) { List<String> notEmptyValues = values.stream().filter(x -> StringUtils.isNotBlank(x)).collect(Collectors.toList()); if (notEmptyValues.isEmpty()) { return StringUtils.EMPTY; } List<String> singleValueCriterionList = Lists.newLinkedList(); notEmptyValues.stream() .map(x -> buildEqualsCriterion(field.getFieldName(), x, operator)) .forEach(singleValueCriterionList::add); if (singleValueCriterionList.size() == 1 && operator == Operator.OR) { return "+" + singleValueCriterionList.get(0); } String multivaluedCriterion = singleValueCriterionList.stream().collect(Collectors.joining(" ")); return (operator == Operator.OR) ? ("+(" + multivaluedCriterion + ")") : multivaluedCriterion; }  String transformToEqualsCriterionWithParsing(F field, String value); String transformToEqualsCriterion(F field, String value); String transformToEqualsCriterion(F field, String value, Operator operator); String transformToEqualsCriterion(F field, Integer value); String transformToEqualsCriterion(F field, Long value); String transformToEqualsCriterion(F field, Enum<?> enumValue); String transformToEqualsCriteria(F field, List<String> values, Operator operator); String transformToEqualsEnumCriteria(F field, List<? extends Enum<?>> values, Operator operator); String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to); String transformToRangeCriterion(F field, String from, String to); String and(String criterion); String join(List<String> criteria);  }### Answer:
@Test public void transformToEqualsCriteria_MULTI_AND() { String actual = criterionTransformer.transformToEqualsCriteria(JudgmentIndexField.KEYWORD, Lists.newArrayList("word1", "word2", "word3"), Operator.AND); assertEquals("+keyword:word1 +keyword:word2 +keyword:word3", actual); }
@Test public void transformToEqualsCriteria_MULTI_OR() { String actual = criterionTransformer.transformToEqualsCriteria(JudgmentIndexField.JUDGMENT_TYPE, Lists.newArrayList(JudgmentType.DECISION.name(), JudgmentType.SENTENCE.name()), Operator.OR); assertEquals("+(judgmentType:DECISION judgmentType:SENTENCE)", actual); }
@Test public void transformToEqualsCriteria_SINGLE_OR() { String actual = criterionTransformer.transformToEqualsCriteria(JudgmentIndexField.JUDGMENT_TYPE, Lists.newArrayList(JudgmentType.DECISION.name()), Operator.OR); assertEquals("+judgmentType:DECISION", actual); }