/** Tests detecting the best title. */
  public void testFindBestTitle() throws MalformedURLException {
    DirectFeed df1 = new DirectFeed();
    DirectFeed df2 = new DirectFeed();

    df1.setBaseTitle("a");
    df2.setXmlURL(new URL("ftp://test"));

    assertEquals("a", GlobalController.findBestTitle(new NetworkFeed[] {df1, df2}));
    assertEquals("a", GlobalController.findBestTitle(new NetworkFeed[] {df2, df1}));
    assertNull(GlobalController.findBestTitle(new NetworkFeed[0]));
  }