when(loader.loadResourceAsText(index.get("two").getURI())).thenReturn(text2);
// When
String targetPath = "target/stories";
String targetExt = ".story";
ResourceImporter importer = new ImportToFilesystem(indexer, loader, targetPath, targetExt);
importer.importResources(rootURI);
// Then
File file1 = new File(targetPath + "/one" + targetExt);
assertThat(file1.exists(), equalTo(true));
assertThat(readFileToString(file1), equalTo(text1));