Added tests and implementation for controllers MaterialsController and MaterialCategoriesController. fixed #46 #47 #49