*/
@Test
public void testNewsManagerSetStateWithMultipleFeedsAndGuidNull() {
final IFeed feed1;
IFeed feed2;
NewsAdapter newsAdapter;
try {
feed1 = DynamicDAO.save(createFeed());
IFeed tempFeed = createFeed("http://adifferentlink.com");
tempFeed.setTitle("A different title");
feed2 = DynamicDAO.save(tempFeed);
} catch (PersistenceException e) {
fail(e.getMessage());
return;
}
final NewsReference[] newsRef = new NewsReference[1];
newsAdapter = new NewsAdapter() {
@Override
public void entitiesAdded(Set<NewsEvent> events) {
assertEquals(1, events.size());
newsRef[0] = new NewsReference(events.iterator().next().getEntity().getId());
}