public Filter parseSingleExpression(final String filterExpression, final List<EntityAttribute> attributes) {
        if (!filterExpression.contains(FIELD_AND_VALUE_SEPARATOR)) {
            throw new IllegalArgumentException(WRONG_FILTER_EXPR_FORMAT_ERROR_MSG);
        }
        final String[] split = filterExpression.split(FIELD_AND_VALUE_SEPARATOR, 2);

        final String fieldPart = split[0];
        if (fieldPart == null || fieldPart.isEmpty()) {
            throw new IllegalArgumentException(WRONG_FILTER_EXPR_FORMAT_ERROR_MSG);
        }
        final String valuePart = split[1];
        if (valuePart == null || valuePart.isEmpty()) {
            throw new IllegalArgumentException(WRONG_FILTER_EXPR_FORMAT_ERROR_MSG);
        }

        final EntityAttribute attributeMetaData = getAttributeMetaData(attributes, fieldPart);

        final SearchQueryField.Type fieldType = attributeMetaData.type();
        if (isRangeValueExpression(valuePart, fieldType)) {
            if (valuePart.startsWith(RANGE_VALUES_SEPARATOR)) {
                return new RangeFilter(attributeMetaData.id(),
                        null,
                        extractValue(fieldType, valuePart.substring(RANGE_VALUES_SEPARATOR.length()))
                );
            } else if (valuePart.endsWith(RANGE_VALUES_SEPARATOR)) {
                return new RangeFilter(attributeMetaData.id(),
                        extractValue(fieldType, valuePart.substring(0, valuePart.length() - RANGE_VALUES_SEPARATOR.length())),
                        null
                );
            } else {
                final String[] ranges = valuePart.split(RANGE_VALUES_SEPARATOR);
                return new RangeFilter(attributeMetaData.id(),
                        extractValue(fieldType, ranges[0]),
                        extractValue(fieldType, ranges[1])
                );
            }
        } else {
            return new SingleValueFilter(attributeMetaData.id(), extractValue(fieldType, valuePart));
        }

    }
@Test
    void parsesFilterExpressionCorrectlyForDateType() {

        assertEquals(new SingleValueFilter("created_at", new DateTime(2012, 12, 12, 12, 12, 12, DateTimeZone.UTC).toDate()),
                toTest.parseSingleExpression("created_at:2012-12-12 12:12:12",
                        List.of(EntityAttribute.builder()
                                .id("created_at")
                                .title("Creation Date")
                                .type(SearchQueryField.Type.DATE)
                                .filterable(true)
                                .build())
                ));
    }