@Test
public void should_collect_auth_rules_needed_by_widgets_in_modal_container() throws Exception {

    Component component1 = mockComponentFor(aWidget().authRules("GET|living/application-menu", "POST|bpm/process"));
    Component component2 = mockComponentFor(aWidget().authRules("GET|bpm/userTask"));
    when(widgetRepository.get("pbContainer")).thenReturn(aWidget().build());
    Set<String> modules = authRulesCollector.visit(aModalContainer().with(aContainer().with(component1, component2)).build());
    assertThat(modules).containsOnly("GET|living/application-menu", "POST|bpm/process", "GET|bpm/userTask");
}