added test and implementation of method getCategoryName