assertNotNull(library.getBooks());
assertNotNull(dto.getBooks());
@SuppressWarnings("unchecked")
List<BookNested> sortedBooks = new TreeList(library.getBooks());
@SuppressWarnings("unchecked")
List<BookDTO> sortedDTOs = new TreeList(dto.getBooks());
assertEquals(sortedBooks.size(), sortedDTOs.size());
for (int i = 0, count=sortedBooks.size(); i < count; ++i) {
BookNested book = sortedBooks.get(i);
BookDTO bookDto = sortedDTOs.get(i);
assertValidMapping(book,bookDto);
}
}