@Test
public final void testScrolling() throws IOException {

    FacesRequest facesRequest = startFacesRequest();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    AbstractExtendedDataTable component = (AbstractExtendedDataTable) facesContext.getViewRoot().findComponent("table");
    ExtendedDataTableRenderer renderer = (ExtendedDataTableRenderer) FacesContext.getCurrentInstance().getRenderKit()
        .getRenderer(component.getFamily(), component.getRendererType());
    Map<String, Object> componentAttributes = component.getAttributes();
    String clientId = component.getClientId(facesContext);
    assertNull(componentAttributes.get(AbstractExtendedDataTable.SUBMITTED_CLIENT_FIRST));
    facesRequest.withParameter(clientId, clientId);
    facesRequest.withParameter("rich:clientFirst", "28");
    renderer.doDecode(facesContext, component);
    assertEquals(28, componentAttributes.get(AbstractExtendedDataTable.SUBMITTED_CLIENT_FIRST));
    assertTrue(facesContext.getPartialViewContext().getRenderIds()
        .contains(clientId + "@" + AbstractExtendedDataTable.SCROLL));
    facesRequest.release();
}