@Test
public void should_return_list_of_module_needed_by_widgets_in_previewable() throws Exception {

    Component component1 = mockComponentFor(aWidget().modules("component1Module", "component1OtherModule"));
    Component component2 = mockComponentFor(aWidget().modules("component2Module", "component2OtherModule"));
    Set<String> modules = requiredModulesVisitor.visit(aPage().with(component1, component2).build());
    assertThat(modules).containsOnly("component1Module", "component1OtherModule", "component2Module", "component2OtherModule");
}