Test getCategoryIndex and getPortfolioIndex