@Test
public void should_collect_auth_rules_needed_by_widgets() throws Exception {

    Component component = mockComponentFor(aWidget().authRules("GET|living/application-menu", "POST|bpm/process"));
    Set<String> modules = authRulesCollector.visit(component);
    assertThat(modules).containsOnly("GET|living/application-menu", "POST|bpm/process");
}