@Override
    public Optional<ShardingConditionValue> generate(final InExpression predicate, final Column column, final List<Object> params, final TimestampServiceRule timestampServiceRule) {
        if (predicate.isNot()) {
            return Optional.empty();
        }
        Collection<ExpressionSegment> expressionSegments = predicate.getExpressionList();
        List<Integer> parameterMarkerIndexes = new ArrayList<>(expressionSegments.size());
        List<Comparable<?>> shardingConditionValues = new LinkedList<>();
        for (ExpressionSegment each : expressionSegments) {
            ConditionValue conditionValue = new ConditionValue(each, params);
            Optional<Comparable<?>> value = conditionValue.getValue();
            if (conditionValue.isNull()) {
                shardingConditionValues.add(null);
                conditionValue.getParameterMarkerIndex().ifPresent(parameterMarkerIndexes::add);
                continue;
            }
            if (value.isPresent()) {
                shardingConditionValues.add(value.get());
                conditionValue.getParameterMarkerIndex().ifPresent(parameterMarkerIndexes::add);
                continue;
            }
            if (ExpressionConditionUtils.isNowExpression(each)) {
                shardingConditionValues.add(timestampServiceRule.getTimestamp());
            }
        }
        return shardingConditionValues.isEmpty() ? Optional.empty()
                : Optional.of(new ListShardingConditionValue<>(column.getName(), column.getTableName(), shardingConditionValues, parameterMarkerIndexes));
    }
@Test
    void assertNowExpression() {
        ListExpression listExpression = new ListExpression(0, 0);
        listExpression.getItems().add(new CommonExpressionSegment(0, 0, "now()"));
        InExpression inExpression = new InExpression(0, 0, null, listExpression, false);
        Optional<ShardingConditionValue> shardingConditionValue = generator.generate(inExpression, column, new LinkedList<>(), timestampServiceRule);
        assertTrue(shardingConditionValue.isPresent());
        assertThat(((ListShardingConditionValue<?>) shardingConditionValue.get()).getValues().iterator().next(), instanceOf(Date.class));
        assertTrue(shardingConditionValue.get().getParameterMarkerIndexes().isEmpty());
    }