@Test
public void should_find_asset_path_used_by_a_component() throws Exception {

    Page page = aPage().withId("page-id").build();
    Asset asset = aFilledAsset(page);
    System.out.println(asset.getName());
    pagesPath.resolve("assets").resolve("js").resolve(asset.getName());
    createDirectories(pagesPath.resolve("assets").resolve("js"));
    temporaryFolder.newFilePath("assets/js/" + asset.getName());
    when(pageRepository.resolvePathFolder("page-id")).thenReturn(pagesPath);
    when(pageRepository.get("page-id")).thenReturn(
            aPage().withAsset(asset).build());
    assertThat(assetRepository.findAssetPath("page-id", "myasset.js", AssetType.JAVASCRIPT).toFile()).exists();
}