UUID p2 = p.getId();
// create books
Book b = new Book();
b.setName("Yust Another Boring Book");
manager.createObject(b);
UUID b1 = b.getId();
b.setId(null);
b.setName("Mystic Almanach");
manager.createObject(b);
UUID b2 = b.getId();
// get a book and modify
b = (Book) manager.getObject(Book.class, b1);
b.setLendToId(p1);
manager.saveObject(b);
b.setLendToId(null);
manager.saveObject(b);
b.setLendToId(p2);
b.setAuthorId(new UUID[] {p1});
manager.saveObject(b);
Book copy = (Book) manager.getObject(Book.class, b.getId());
assertEquals(copy.getAuthorId()[0],p1) ;
// test relations
assertNotNull(b.getLendTo());
Person rel = b.getLendTo().getRelation();