}
public void testFindReservationByID() {
em.getTransaction().begin();
Reservation reservation1 = new Reservation(em.find(Reader.class, new Long(1)),
em.find(Book.class, new Long(8)), new Date(System.currentTimeMillis()));
Reservation reservation2 = new Reservation(em.find(Reader.class, 1l),
em.find(Book.class, new Long(9)), new Date(System.currentTimeMillis()));
em.persist(reservation1);
em.persist(reservation2);
em.getTransaction().commit();
reservation1.setReservationID(new Long(1));
reservation2.setReservationID(new Long(2));
assertEquals(reservation1, reservationDAOImpl.findReservationByID(new Long(1)));
assertEquals(reservation2, reservationDAOImpl.findReservationByID(new Long(2)));
if (em != null) {