fix the test

Real change is made in deleteCategories(), the rest is code formatting issue