HelmPathUtils extends ComponentSupport { @Nullable public String contentFileUrl( final String filename, final Content indexYaml) { String chartName = getChartName(filename); String chartVersion = getChartVersion(filename); return urlRewriter.getFirstUrl(indexYaml, chartName, chartVersion).orElse(null); } @Inject  HelmPathUtils(final IndexYamlAbsoluteUrlRewriter urlRewriter); String filename(final State state); String contentFilePath(
      final State state,
      final boolean isForwardingSlash); @Nullable String contentFileUrl(
      final String filename,
      final Content indexYaml); String getChartName(final String filename); String getChartVersion(final String filename); String extension(final State state); State matcherState(final Context context); String buildAssetPath(final State matcherState); String buildContentAssetPath(final State matcherState);  }
@Test public void testContentFileUrl() throws IOException { Content content = mock(Content.class); when(content.openInputStream()).thenReturn(getClass().getResourceAsStream("indexresult.yaml")); String url = underTest.contentFileUrl(FILENAME, content); assertThat(url, is(equalTo("mongodb-0.5.2.tgz"))); }