PivotUtils { public static void createOrderRow(final Row orderRow, final List<Integer> orderList) { int i = 0; for (final Integer order : orderList) { final Cell cell = orderRow.createCell((short) i++); cell.setCellValue(order); } }  static void createAnnotationRow(final Row annotationRow, final List<String> annotationList); static void createOrderRow(final Row orderRow, final List<Integer> orderList); static void createTypeRow(final Row typeRow, final List<AggregationType> typeList);  }
@Test public void createOrderRowTest() { XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet sheet = workbook.createSheet(); Row r = sheet.createRow(1); List<Integer> l = Arrays.asList(1, 0, 2); PivotUtils.createOrderRow(r,l); Assertions.assertThat(r.getCell(0).getNumericCellValue()).isEqualTo(1); Assertions.assertThat(r.getCell(1).getNumericCellValue()).isEqualTo(0); Assertions.assertThat(r.getCell(2).getNumericCellValue()).isEqualTo(2); }