@Test
public void should_concatenate_and_minify_widgets_directives_file_who_was_use_in_page() throws Exception {

    Page page = aPage().build();
    initFilesForConcatAndMinify(page);
    mockWidgetIdVisitorAndWidgetRepository(page, "pbLabel", "paragraph");
    Path path = temporaryFolder.toPath().resolve("pages").resolve(page.getId());
    String expected = "\nList<String>filename=getWidgetsFilesUsedInPage(previewable);" +
            "byte[]content=getConcatenationWidgetsDirectives(filename);file2";
    String filename = generator.generateAllDirectivesFilesInOne(page, path);
    assertThat(new String(readAllBytes(path.resolve(filename)),"UTF-8")).isEqualTo(expected);
    assertThat(filename).isEqualTo("widgets-0f2d4ba1fa1992794df3dca7a9b8e4ec735b4746.min.js");
}