@Test
public void should_return_list_of_asset_needed_by_widgets_in_formcontainer() throws Exception {

    Component component1 = mockComponentFor(aWidget(), UUID.randomUUID().toString(), anAsset().withName("myfile.js").withType(AssetType.JAVASCRIPT));
    Component component2 = mockComponentFor(aWidget(), UUID.randomUUID().toString(), anAsset().withName("myfile.css").withType(AssetType.CSS));
    when(widgetRepository.get("pbFormContainer")).thenReturn(aWidget().build());
    when(widgetRepository.get("pbContainer")).thenReturn(aWidget().build());
    Set<Asset> assets = assetVisitor.visit(aFormContainer().with(
            aContainer().with(component1, component2)).build());
    assertThat(assets).extracting("name").containsOnly("myfile.js", "myfile.css");
}