"</LibraryBeanWithArraySetter>";
BeanReader reader = new BeanReader();
reader.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
reader.getBindingConfiguration().setMapIDs(false);
reader.registerBeanClass(LibraryBeanWithArraySetter.class);
LibraryBeanWithArraySetter bean = (LibraryBeanWithArraySetter) reader.parse(new StringReader(xml));
BookBean[] books = bean.getBooks();
assertEquals("Three books read", 3, books.length);
assertEquals("Book one", new BookBean("Martin Fowler", "Refactoring", "Addision Wesley"), books[0]);