added new api call getCategories and test for it