private void assertCollections(List<AppCollection> expectedcollections,
List<AppCollection> collections) {
assertEquals(expectedcollections.size(), collections.size());
for (int i = 0; i < expectedcollections.size(); ++i) {
AppCollection expectedCollection = expectedcollections.get(i);
AppCollection collection = collections.get(i);
assertEquals(expectedCollection.getLang(), collection.getLang());
assertEquals(expectedCollection.getBase(), collection.getBase());
assertEquals(expectedCollection.getHref(), collection.getHref());
assertEquals(expectedCollection.getTitle().getType(), collection.getTitle().getType());
assertEquals(expectedCollection.getTitle().getValue(), collection.getTitle().getValue());
assertEquals(expectedCollection.getOtherAttributes()
.get(new QName("anyAttirbCollection")), collection.getOtherAttributes()
.get(new QName("anyAttirbCollection")));
List<AppAccept> expectedAccepts = expectedCollection.getAccept();
List<AppAccept> accepts = collection.getAccept();
assertEquals(expectedAccepts.size(), accepts.size());
assertEquals(expectedAccepts.get(0).getValue(), accepts.get(0).getValue());
assertEquals(expectedAccepts.get(1).getValue(), accepts.get(1).getValue());
List<AppCategories> expectedCategories = expectedCollection.getCategories();
List<AppCategories> categories = collection.getCategories();
assertEquals(expectedCategories.size(), categories.size());
assertNull(categories.get(0).getHref());
assertEquals(expectedCategories.get(0).getScheme(), categories.get(0).getScheme());
assertEquals(expectedCategories.get(0).getFixed(), categories.get(0).getFixed());