@Test
public void should_build_a_well_formed_page_property_file() throws Exception {

    page.setId("aPageId");
    page.setName("aPageName");
    page.setDescription("a page description with special characters &'\"é");
    page.setDisplayName("a display name with special characters &'\"é");
    when(pageResource.getResources(page.getId())).thenReturn(Arrays.asList(""));
    String properties = new String(pagePropertiesBuilder.build(page));
    assertThat(properties).contains("contentType=page");
    assertThat(properties).contains("name=custompage_aPageName");
    assertThat(properties).contains("displayName=a display name with special characters &'\"\\u00E9" );
    assertThat(properties).contains("description=a page description with special characters &'\"\\u00E9");
    assertThat(properties).contains("resources=[]");
}