Re-factor test of getCommonscatTemplates
Bug: T145574 Change-Id: Ia3a5642ca8e6c0a6dcba38e6cf997b92ff1d42f1