Long uniqueId = catalogSources.getPrimaryKey();
assertNotNull (uniqueId);
CatalogSources persistedCatalogSources =
catalogSourcesDAO.find(uniqueId);
List<CatalogSource> persistedCatalogSourceList =
persistedCatalogSources.getSourceList();
assertNotNull (persistedCatalogSources);
assertEquals (28, persistedCatalogSourceList.size());
CatalogSource catalogSource = persistedCatalogSourceList.remove(0);
catalogSource.getPrimaryKey();
catalogSourcesDAO.merge(persistedCatalogSources);
CatalogSources mergedCatalogSources =
catalogSourcesDAO.find(uniqueId);
List<CatalogSource> mergedCatalogSourceList =
persistedCatalogSources.getSourceList();
assertEquals (27, mergedCatalogSourceList.size());
catalogSourcesDAO.remove(mergedCatalogSources);
CatalogSources nullCatalogSources =
catalogSourcesDAO.find(uniqueId);
assertNull (nullCatalogSources);
}