global without sharing class ControllerUtil { public ControllerUtil() { Integer i = 0; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; i++; } public static Pricebook2 getStandardPricebook() { if (Test.isRunningTest()) { return new Pricebook2(Id = Test.getStandardPricebookId(), Name = 'Standard Pricebook'); } else { List pbs = [Select Id, Name From Pricebook2 where IsStandard = true]; if (pbs.size() > 0) { return pbs[0]; } else { return null; } } } public static void updateExpress(List upLeList){ update upLeList; } public class myException extends Exception {} }