AssetPathBrowseNodeGenerator implements BrowseNodeGenerator { @Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); List<String> pathSegments = Splitter.on(SLASH_CHAR).omitEmptyStrings().splitToList(asset.path()); return BrowsePathBuilder.fromPaths(pathSegments, false); }  @Override List<BrowsePath> computeAssetPaths(final Asset asset); @Override List<BrowsePath> computeComponentPaths(final Asset asset);  }
@Test public void computeAssetPathsNoComponent() { Asset asset = createAsset("asset/path/foo"); List<BrowsePath> paths = generator.computeAssetPaths(asset); assertPaths(asList("asset", "path", "foo"), paths); }
@Test public void computeAssetPathsWithComponent() { Component component = createComponent("component", "group", "1.0.0"); Asset asset = createAsset("asset/path/foo", component); List<BrowsePath> paths = generator.computeAssetPaths(asset); assertPaths(asList("asset", "path", "foo"), paths); }