public void testPartitionSizeWithCategories() throws Exception {
FacetSearchParams fsp = new FacetSearchParams();
Directory dir = newDirectory();
TaxonomyWriter tw = new LuceneTaxonomyWriter(dir);
tw.addCategory(new CategoryPath("a"));
tw.commit();
tw.close();
TaxonomyReader tr = new LuceneTaxonomyReader(dir);
assertEquals("unexpected partition offset for 1 categories", 2, PartitionsUtils.partitionOffset(fsp, 1, tr));
assertEquals("unexpected partition size for 1 categories", 2, PartitionsUtils.partitionSize(fsp,tr));
tr.close();