ReportDefinition rd = getReportDefinition();
ReportInstance instance = new ReportInstance(2);
instance.setReportDefinition(rd);
instance.generateItems(null);
ResultSetOutput output = instance.getResultSetOutput();
assertEquals(5, instance.getTotalCount());
assertEquals(2, output.getColumns().size());
assertEquals("USER_NAME", output.getHeaderNames()[0]);
assertEquals("EMAIL", output.getHeaderNames()[1]);
Object[] user1 = (Object[]) output.getColumns().get(0);
assertEquals("user1", user1[0]);
assertEquals("user1@javaeye.com", user1[1]);
Object[] user2 = (Object[]) output.getColumns().get(1);
assertEquals("user2", user2[0]);
assertEquals("user2@javaeye.com", user2[1]);
}