@Test
public void should_return_list_of_asset_used_by_widgets() throws Exception {

    Component component = mockComponentFor(
            aWidget(),
            UUID.randomUUID().toString(),
            anAsset().withName("myfile.js").withType(AssetType.JAVASCRIPT),
            anAsset().withName("http://mycdn.com/myfile.js").withType(AssetType.JAVASCRIPT)
    );
    Page page = aPage().with(component).build();
    Set<Asset> assets = assetVisitor.visit(page);
    assertThat(assets).extracting("name").containsOnlyOnce("myfile.js", "http://mycdn.com/myfile.js");
}