public static Optional<Collection<Comparable<?>>> extractValues(final ExpressionSegment expression, final List<Object> params) {
        Collection<Comparable<?>> result = new LinkedList<>();
        if (expression instanceof BinaryOperationExpression) {
            extractValues(((BinaryOperationExpression) expression).getRight(), params).ifPresent(result::addAll);
        }
        if (expression instanceof InExpression) {
            extractValues(((InExpression) expression).getRight(), params).ifPresent(result::addAll);
        }
        if (expression instanceof ListExpression) {
            ((ListExpression) expression).getItems().forEach(each -> extractValueInSimpleExpressionSegment(each, params).ifPresent(result::add));
        }
        if (expression instanceof SimpleExpressionSegment) {
            extractValueInSimpleExpressionSegment(expression, params).ifPresent(result::add);
        }
        return result.isEmpty() ? Optional.empty() : Optional.of(result);
    }
@Test
    void assertExtractValuesSimpleExpressionSegment() {
        SimpleExpressionSegment simpleExpressionSegment = new LiteralExpressionSegment(1, 2, "expected");
        List<Object> params = new LinkedList<>();
        assertTrue(ShadowExtractor.extractValues(simpleExpressionSegment, params).isPresent());
        assertThat(ShadowExtractor.extractValues(simpleExpressionSegment, params).get().iterator().next(), is("expected"));
    }