public class IndexWithBreadcrumbsBehaviour {
@Test
public void canIndexFromPaths() {
IndexWithBreadcrumbs indexer = new IndexFromXWiki();
String rootURI = "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages";
String syntax = "jbehave/3.0";
Map<String, Resource> index = indexer.indexResources(rootURI, "src/test/resources", syntax, "stories/**");
assertThat(index.containsKey("a_first"), equalTo(true));
Resource first = index.get("a_first");
assertThat(first.getURI(), equalTo(rootURI + "/a_first"));
assertThat(first.getParentName(), equalTo("stories"));
assertThat(join(first.getBreadcrumbs(), "/"), equalTo("stories"));