add TestCategoryTree including a test of eliminateAllSingletons method