@Test
public void doTest() throws Exception
{
WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
ParamEncoder encoder = new ParamEncoder("table");
// not sorted
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "1");
checkNumberOfIterations(runner.getResponse(request), 1);
// page 2, sorted
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_SORT), "1");
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "2");
checkNumberOfIterations(runner.getResponse(request), 1);
// export full
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "2");
request.setParameter(
encoder.encodeParameterName(TableTagParameters.PARAMETER_EXPORTTYPE),
Integer.toString(MediaTypeEnum.CSV.getCode()));
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "1");
WebResponse response = runner.getResponse(request);
String csvExport = response.getText();
if (log.isDebugEnabled())
{