@Test
public void should_create_a_page_with_a_business_data_when_contract_contains_data_reference_on_a_task() throws Exception {

    ContractToPageMapper contractToPageMapper = makeContractToPageMapper();
    Page page = contractToPageMapper.createFormPage("myPage", aSimpleContractWithDataRef(EditMode.EDIT), FormScope.TASK);
    assertThat(page.getVariables()).contains(entry("employee",anURLVariable().value("../{{context.employee_ref.link}}").build()));
    assertThat(page.getVariables()).contains(entry("employee_addresses",anURLVariable().value("{{employee|lazyRef:'addresses'}}").build()));
    assertThat(page.getVariables()).contains(entry("employee_manager",anURLVariable().value("{{employee|lazyRef:'manager'}}").build()));
    assertThat(page.getVariables()).contains(entry("employee_manager_addresses",anURLVariable().value("{{employee_manager|lazyRef:'addresses'}}").build()));
    assertThat(page.getVariables()).doesNotContain(entry("employee_addresses_country",anURLVariable().value("{{employee_addresses|lazyRef:'country'}}").build()));
}