PIM-865 : Add more UT on CategoryExtension and clean code