@Override
  public Optional<String> getUrlPathToJs() {
    return Optional.ofNullable(analytics)
      .map(WebAnalytics::getUrlPathToJs)
      .filter(path -> !path.startsWith("/") && !path.contains("..") && !path.contains("://"))
      .map(path -> "/" + path);
  }
@Test
  public void return_js_path_if_analytics_plugin_is_installed() {
    WebAnalytics analytics = newWebAnalytics("api/google/analytics");
    WebAnalyticsLoaderImpl underTest = new WebAnalyticsLoaderImpl(new WebAnalytics[] {analytics});

    assertThat(underTest.getUrlPathToJs()).hasValue("/api/google/analytics");
  }