@Test
public final void testEncodeCaption() throws IOException {

    HtmlPage page = environment.getPage("/dataGridTest.jsf");
    HtmlElement dataGrid = page.getElementById("dataGrid");
    assertEquals("captionFacet",
        ((HtmlElement) dataGrid.getFirstByXPath("caption[@class='rf-dg-cap']//*[@id='dataGrid:captionFacet']"))
            .getTextContent());
}