protected InterMineBag createEmployeeList() throws Exception {
   ObjectStoreWriter osw = null;
   try {
     Profile superUser = im.getProfileManager().getSuperuserProfile();
     osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest");
     Employee e1 = new Employee();
     e1.setName("Employee1");
     Employee e2 = new Employee();
     e2.setName("Employee2");
     Department d1 = new Department();
     d1.setName("department");
     Company company = new CompanyShadow();
     company.setName("company");
     Contractor contractor = new Contractor();
     contractor.setName("contractor");
     osw.store(contractor);
     company.addContractors(contractor);
     osw.store(company);
     d1.setCompany(company);
     osw.store(d1);
     e1.setDepartment(d1);
     e2.setDepartment(d1);
     osw.store(e1);
     osw.store(e2);
     InterMineBag list = superUser.createBag("employeeList", "Employee", "", im.getClassKeys());
     Collection<Integer> ids = new ArrayList<Integer>();
     ids.add(e1.getId());
     ids.add(e2.getId());
     list.addIdsToBag(ids, "Employee");
     return list;
   } finally {
     osw.close();
   }
 }