public void testSorting() throws ResourceException
{
URL url = getClass().getResource("crosstab-sorting.prpt");
MasterReport report = (MasterReport) new ResourceManager().createDirectly(url, MasterReport.class).getResource();
report.setAutoSort(true);
SortOrderReportPreProcessor p = new SortOrderReportPreProcessor();
List<SortConstraint> sortConstraints = p.computeSortConstraints(report.getReportFooter().getSubReport(0));
List<SortConstraint> expectedSortConstraints = new ArrayList<SortConstraint>();
expectedSortConstraints.add(new SortConstraint("year", true));
expectedSortConstraints.add(new SortConstraint("month", true));
Assert.assertEquals(expectedSortConstraints, sortConstraints);
DebugReportRunner.execGraphics2D(report);