@Test
public void testOfAllOperators() throws Exception {

    Map<RequestObject, Object> filters = ImmutableMap.of(
            RequestField.of("name"), ImmutableMap.builder()
                    .put(RequestOperator.of(OperatorType.STARTS_WITH), "John")
                    .put(RequestOperator.of(OperatorType.IN), Lists.newArrayList("John", "Bob"))
                    .put(RequestOperator.of(OperatorType.LESS_THAN), 4)
                    .put(RequestOperator.of(OperatorType.EQUAL), "John")
                    .put(RequestOperator.of(OperatorType.GREATER_THAN), 1)
                    .put(RequestOperator.of(OperatorType.GREATER_THAN_EQUAL), 2)
                    .put(RequestOperator.of(OperatorType.LESS_THAN_EQUAL), 3)
                    .put(RequestOperator.of(OperatorType.NOT_EQUAL), "Bob")
                    .put(RequestOperator.of(OperatorType.NOT_IN), Lists.newArrayList("Brian", "Adam"))
                    .build()
    );
    Criteria result = requestParamsCriteriaBuilder.build(filters);
    assertThat(result).isEqualTo(new Criteria().andOperator(
            Criteria.where("name").regex("^John", "i"),
            Criteria.where("name").in("John", "Bob"),
            Criteria.where("name").lt(4),
            Criteria.where("name").is("John"),
            Criteria.where("name").gt(1),
            Criteria.where("name").gte(2),
            Criteria.where("name").lte(3),
            Criteria.where("name").ne("Bob"),
            Criteria.where("name").nin("Brian", "Adam")));
}