@Test
public void testFilterStartingWithFieldFollowedByOperatorShouldProduceProperCriteria() throws Exception {

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