Flight firstOne = new Flight();
firstOne.setId(new Long(1));
firstOne.setName("AF0101");
manager.persist(firstOne);
Flight second = new Flight();
second.setId(new Long(2));
second.setName("US1");
Set<Customer> customers1 = new HashSet<Customer>();
Set<Customer> customers2 = new HashSet<Customer>();
Customer bill = new Customer();
CustomerPK pk = new CustomerPK(genid++, "Bill");
bill.setPk(pk);
customers1.add(bill);
Customer monica = new Customer();
CustomerPK moPK = new CustomerPK(genid++, "Monica");
monica.setPk(moPK);
customers1.add(monica);
Customer molly = new Customer();
CustomerPK mollyPK = new CustomerPK(genid++, "Molly");
molly.setPk(mollyPK);
customers2.add(molly);
firstOne.setCustomers(customers1);
second.setCustomers(customers2);
manager.persist(second);