@Test
@InSequence(2)
public void testManyToOne() throws Exception {
EntityTest test = lookup("EntityTest", EntityTest.class);
Flight f = test.manyToOneCreate();
Flight f2 = test.findFlightById(f.getId());
assertEquals(f.getId(), new Long(1));
assertEquals(f.getName(), f2.getName());
assertEquals(f.getCompany().getName(), f2.getCompany().getName());
Company c = test.findCompanyById(f.getCompany().getId());
assertNotNull("Company has one flight.", c.getFlights());
assertEquals(f.getCompany().getFlights().size(), c.getFlights().size());
}