*/
@Test
public void testAuthorBookSimple() throws Exception
{
// create one author
Author asimov = new Author();
asimov.setBirthYear(1920);
asimov.setFirstName("Isaac");
asimov.setLastName("Asimov");
// create some books
Book foundation = new Book("Foundation");
foundation.setPublishedYear(1951);
foundation.addKeyWord("science fiction");
foundation.addKeyWord("psychohistory");
asimov.addBook(foundation);
Book cavesofsteel = new Book("The Caves of Steel");
cavesofsteel.setPublishedYear(1954);
cavesofsteel.addKeyWord("science fiction");
cavesofsteel.addKeyWord("robot");
cavesofsteel.addKeyWord("crime");
asimov.addBook(cavesofsteel);
// save everything
PersistenceManager persist = new PersistenceManager(driver, database, login, password);
persist.saveObject(asimov);
persist.close();
// open a new connection
persist = new PersistenceManager(driver, database, login, password);
// find all books with the authors last name 'Asimov'.
asimov = new Author();
asimov.setLastName("Asimov");
Book seekBook = new Book();
seekBook.addAuthor(asimov);
List<Book> asimovBooks = persist.getObjects(Book.class, new Equal(seekBook));
assertEquals(2, asimovBooks.size());
// print the title of the scifi books