private void assertWorkspaces(List<AppWorkspace> expectedWorkspaces,
List<AppWorkspace> workspaces) {
assertEquals(expectedWorkspaces.size(), workspaces.size());
for (int i = 0; i < expectedWorkspaces.size(); ++i) {
AppWorkspace expectedWorkspace = expectedWorkspaces.get(i);
AppWorkspace workspace = workspaces.get(i);
assertEquals(expectedWorkspace.getLang(), workspace.getLang());
assertEquals(expectedWorkspace.getBase(), workspace.getBase());
assertEquals(expectedWorkspace.getTitle().getType(), workspace.getTitle().getType());
assertEquals(expectedWorkspace.getTitle().getValue(), workspace.getTitle().getValue());
assertEquals(expectedWorkspace.getOtherAttributes()
.get(new QName("anyAttirbCollection")), workspace.getOtherAttributes()
.get(new QName("anyAttirbCollection")));
assertNotNull(workspace.getCollection("collection1"));
assertNotNull(workspace.getCollection("collection2"));
assertNull(workspace.getCollection("collection3"));
assertCollections(expectedWorkspace.getCollection(), workspace.getCollection());
}
}