public static PredicateTreeAnalyzerResult analyzePredicateTree(Predicate predicate) {
        AnalyzerContext context = new AnalyzerContext();
        int treeSize = aggregatePredicateStatistics(predicate, false, context);
        int minFeature = ((int)Math.ceil(findMinFeature(predicate, false, context))) + (context.hasNegationPredicate ? 1 : 0);
        return new PredicateTreeAnalyzerResult(minFeature, treeSize, context.subTreeSizes);
    }
@Test
    void require_that_featureconjunctions_count_as_leaf_in_subtree_calculation() {
        Predicate p =
                and(
                        and(
                                feature("grault").inRange(0, 10),
                                feature("waldo").inRange(0, 10)),
                        conj(
                                feature("foo").inSet("bar"),
                                feature("baz").inSet("qux"),
                                feature("quux").inSet("corge")));
        PredicateTreeAnalyzerResult r = PredicateTreeAnalyzer.analyzePredicateTree(p);
        assertEquals(3, r.minFeature);
        assertEquals(3, r.treeSize);
        assertEquals(4, r.sizeMap.size());
        assertSizeMapContains(r, pred(p).child(0), 2);
        assertSizeMapContains(r, pred(p).child(0).child(0), 1);
        assertSizeMapContains(r, pred(p).child(0).child(1), 1);
        assertSizeMapContains(r, pred(p).child(1), 1);
    }