@Test
public void testProduceCriteriaWithMultipleRootLevelElements() throws Exception {

    Map<RequestObject, Object> filters = ImmutableMap.of(
            RequestField.of("name"), ImmutableMap.of(RequestOperator.of(OperatorType.STARTS_WITH), "John"),
            RequestField.of("secondName"), ImmutableMap.of(RequestOperator.of(OperatorType.STARTS_WITH), "Bob"),
            RequestField.of("lastName"), ImmutableMap.of(RequestOperator.of(OperatorType.IN), Lists.newArrayList("Doe", "Smith"))
    );
    Criteria result = requestParamsCriteriaBuilder.build(filters);
    assertThat(result).isEqualTo(new Criteria().andOperator(
            Criteria.where("name").regex("^John", "i"),
            Criteria.where("secondName").regex("^Bob", "i"),
            Criteria.where("lastName").in("Doe", "Smith")));
}