assertEquals("Wrong Category relationship", testCategory, found.getCategory());
}
public void testFindByContentVersionAttribute() throws Exception
{
ContentCategoryVO sameAttribute = new ContentCategoryVO();
sameAttribute.setAttributeName(getName());
sameAttribute.setContentVersionId(VERSION_ID);
sameAttribute.setCategory(testCategory);
sameAttribute = testController.save(sameAttribute, InfoGluePrincipalControllerProxy.getController().getTestPrincipal());
extraContentCategories.add(sameAttribute);
ContentCategoryVO differentAttribute = new ContentCategoryVO();
differentAttribute.setAttributeName("randomAttribute");
differentAttribute.setContentVersionId(VERSION_ID);
differentAttribute.setCategory(testCategory);
differentAttribute = testController.save(differentAttribute, InfoGluePrincipalControllerProxy.getController().getTestPrincipal());
extraContentCategories.add(differentAttribute);
List found = testController.findByContentVersionAttribute(getName(), VERSION_ID);
assertEquals("Wrong number of ContentCategories returned", 2, found.size());