public void testAsLocalEJB() throws Exception
{
log.info("entering testAsLocalEJB()");
// Create book.
Book book1 = new Book("RESTEasy: the Sequel");
int id1 = eventSource.createBook(book1);
log.info("id1: " + id1);
Assert.assertEquals(0, id1);
// Create another book.
Book book2 = new Book("RESTEasy: It's Alive");
int id2 = eventSource.createBook(book2);
log.info("id2: " + id2);
Assert.assertEquals(1, id2);
// Retrieve first book.
Book bookResponse1 = eventSource.lookupBookById(id1);
log.info("book1 response: " + bookResponse1);
Assert.assertEquals(book1, bookResponse1);
// Retrieve second book.
Book bookResponse2 = eventSource.lookupBookById(id2);
log.info("book2 response: " + bookResponse2);
Assert.assertEquals(book2, bookResponse2);
}