FuelConsumerBG bg = new FuelConsumerBGImpl("foo", new Service("bar"), "shebop");
NewFuelConsumerPG pg = (NewFuelConsumerPG)getPlanningFactory().createPropertyGroup(FuelConsumerPG.class);  pg.setService("bar"); pg.setTheater("shebop"); FuelConsumerBG bg = new FuelConsumerBG(pg); pg.setFuelBG(bg);
  public void expandGenerateProjections(Task gpTask, Schedule schedule, Asset consumer) {    // TODO: Add diff based planning code    // TODO: handle adds, changes, removes as necessary    // TODO: create method to compare rates and extract tasks based on time, e.g., overlapping schedules    // This is a mix of temp code to capture the logic. Add    // real code when it is available.  --llg    // asset.getBG    FuelConsumerBG bg = new FuelConsumerBGImpl("foo", new Service("bar"), "shebop");    Collection items = bg.getConsumed();    Collection subTasks = new ArrayList();    for (Iterator iterator = items.iterator(); iterator.hasNext();) {      Asset consumedItem = (Asset) iterator.next();      Enumeration scheduleElements = schedule.getAllScheduleElements();      Rate rate;      // for every item consumed, walk the schedule elements and get the rates      while (scheduleElements.hasMoreElements()) {        ObjectScheduleElement ose = (ObjectScheduleElement) scheduleElements.nextElement();        rate = bg.getRate(consumedItem, (List) ose.getObject());        subTasks.add(createProjectSupplyTask(gpTask, consumedItem, consumer, ose.getStartTime(),                                             ose.getEndTime(), rate, 0.0));      }      publishAddExpansion(subTasks, gpTask, consumer);    }  }