private List<DataRetentionRule> getActiveRules(final List<DataRetentionRule> rules) {
        // make sure we create a list of rules that are enabled and have at least one enabled term.
        final List<DataRetentionRule> activeRules;
        if (rules != null) {
            activeRules = rules.stream()
                    .filter(rule -> rule.isEnabled()
                            && rule.getExpression() != null
                            && rule.getExpression().enabled())
                    .collect(Collectors.toList());
        } else {
            activeRules = Collections.emptyList();
        }
        return activeRules;
    }
Pkg private so we can test with a known now time
stroom-data/stroom-data-retention-impl/src/main/java/stroom/data/retention/impl/DataRetentionPolicyExecutor.java