@Test
public void should_add_relative_bonita_resource_found_in_page_data() throws Exception {

    Map<String, Data> dataMap = new TreeMap<String, Data>();
    dataMap.put("foo", anApiData("../API/bpm/userTask?filter=mine"));
    dataMap.put("bar", anApiData("../API/identity/user/1"));
    dataMap.put("other", anApiData("../API/identity/group/1?param=value"));
    dataMap.put("archived", anApiData("../API/bpm/archivedUserTask?filter=mine&o=name DESC"));
    page.setData(dataMap);
    when(pageResource.getResources(page.getId())).thenReturn(Arrays.asList("GET|bpm/archivedUserTask", "GET|identity/user", "GET|bpm/userTask", "GET|identity/group"));
    String properties = new String(pagePropertiesBuilder.build(page));
    assertThat(properties).contains("resources=[GET|bpm/archivedUserTask, GET|identity/user, GET|bpm/userTask, GET|identity/group]");
}