@Test
public void should_add_bonita_resources_found_in_pages_widgets() throws Exception {

    setUpPageForResourcesTests();
    Set<String> authRules = new TreeSet<>();
    authRules.add("GET|living/application-menu");
    authRules.add("POST|bpm/process");
    page.setVariables(singletonMap("foo", anApiVariable("../API/bpm/userTask?filter=mine")));
    when(authRulesCollector.visit(page)).thenReturn(authRules);
    String properties = new String(pageResource.getResources(page.getId()).toString());
    assertThat(properties).contains("[GET|bpm/userTask, GET|living/application-menu, POST|bpm/process]");
}