Hamamatsu APD for CMS ECAL: Quality insurance