class FPGrowth {

    public List<ItemsetWithCount> getItemsetsWithSupportRatio(List<Set<Integer>> transactions,
                                                              Double supportRatio) {
        return getItemsetsWithSupportRatio(transactions, null, supportRatio);
    }

}

class FPGrowthTest {

    @Test
    public void simpleTest() {

        List<Set<Integer>> txns = new ArrayList<>();
        txns.add(intIfy("a, b, c"));
        txns.add(intIfy("a, b"));
        txns.add(intIfy("a"));

        FPGrowth fp = new FPGrowth();
        Apriori ap = new Apriori();

        Set<ItemsetWithCount> ap_itemsets = ap.getItemsets(txns, .7);
        List<ItemsetWithCount> itemsets = fp.getItemsetsWithSupportRatio(txns, .7);

        //printItemsets(itemsets);
        assertEquals(3, itemsets.size());
        assert(compareResults(ap_itemsets, itemsets));
    }

}