public static URI getUriFromTrackingPlugins(ApplicationId id,
      List<TrackingUriPlugin> trackingUriPlugins)
      throws URISyntaxException {
    URI toRet = null;
    for(TrackingUriPlugin plugin : trackingUriPlugins)
    {
      toRet = plugin.getTrackingUri(id);
      if (toRet != null)
      {
        return toRet;
      }
    }
    return null;
  }
@Test
  void testGetProxyUriFromPluginsReturnsValidUriWhenAble()
      throws URISyntaxException {
    ApplicationId id = BuilderUtils.newApplicationId(6384623l, 5);
    List<TrackingUriPlugin> list =
        Lists.newArrayListWithExpectedSize(2);
    // Insert a plugin that returns null.
    list.add(new TrackingUriPlugin() {
      public URI getTrackingUri(ApplicationId id) throws URISyntaxException {
        return null;
      }
    });
    // Insert a plugin that returns a valid URI.
    list.add(new TrackingUriPlugin() {
      public URI getTrackingUri(ApplicationId id) throws URISyntaxException {
        return new URI("http://history.server.net/");
      }
    });
    URI result = ProxyUriUtils.getUriFromTrackingPlugins(id, list);
    assertNotNull(result);

  }