@Test
public void should_readAllBytes_asset() throws Exception {

    Page page = aPage().withId("page-id").build();
    Asset asset = aFilledAsset(page);
    Path fileExpected = pagesPath.resolve("assets").resolve("js").resolve(asset.getName());
    createDirectories(pagesPath.resolve("assets").resolve("js"));
    temporaryFolder.newFilePath("assets/js/" + asset.getName());
    assertThat(fileExpected.toFile()).exists();
    when(pageRepository.resolvePathFolder("page-id")).thenReturn(pagesPath);
    when(pageRepository.get(asset.getComponentId())).thenReturn(page);
    assertThat(assetRepository.readAllBytes(asset)).isNotNull().isEmpty();
}