@Test
public void testFilterStartingWithLogicalOperatorShouldProduceProperCriteria() throws Exception {

    Map<RequestObject, Object> filters = ImmutableMap.of(
            RequestLogicalOperator.of(LogicalOperatorType.OR),
            ImmutableMap.of(RequestField.of("name"),
                    ImmutableMap.of(RequestOperator.of(OperatorType.STARTS_WITH), "John")
            ));
    Criteria result = requestParamsCriteriaBuilder.build(filters);
    assertThat(result).isEqualTo(new Criteria().orOperator(Criteria.where("name").regex("^John", "i")));
}