@Test
public void testRun()
{

  LocalMode lma = LocalMode.newInstance();
  DAG dag = lma.getDAG();
  RomeSyndicationOperator rop = dag.addOperator("romesyndication", RomeSyndicationOperator.class);
  FeedCollector fc = dag.addOperator("feedcollector", FeedCollector.class);
  dag.addStream("ss", rop.outputPort, fc.input);
  rop.setInterval(2000);
  //rop.setLocation("http://rss.cnn.com/rss/cnn_topstories.rss");
  rop.setStreamProvider(new CNNSyndicationTestProvider());
  try {
    LocalMode.Controller lc = lma.getController();
    lc.setHeartbeatMonitoringEnabled(false);
    lc.run(10000);
    Assert.assertEquals("Entries size", entries.size(), 10);
    // Check first entry
    Assert.assertEquals("First entry title", entries.get(0).getSyndEntry().getTitle(), "Dimensions Computation (Aggregate Navigator) Part 1: Intro");
    Assert.assertEquals("First entry URI", entries.get(0).getSyndEntry().getUri(), "https://www.datatorrent.com/?p=2399");
    // Check first entry from second run
    Assert.assertEquals("Second run first entry title", entries.get(7).getSyndEntry().getTitle(), "Building Applications with Apache Apex and Malhar");
    Assert.assertEquals("Second run first entry URI", entries.get(7).getSyndEntry().getUri(), "https://www.datatorrent.com/?p=2054");
    // Check last entry
    Assert.assertEquals("Last entry title", entries.get(9).getSyndEntry().getTitle(), "Dimensions Computation (Aggregate Navigator) Part 2: Implementation");
    Assert.assertEquals("Last entry URI", entries.get(9).getSyndEntry().getUri(), "https://www.datatorrent.com/?p=2401");
  } catch (Exception ex) {
    logger.error(ex.getMessage());
    Assert.assertFalse(true);
  }
}