@Test
public void testGetPageLabels() throws Exception {

    File testFile = TestResourceUtils.getResourceAsTempFile(this, "test-prefix-reset.pdf");
    String[] expectedPageLabels = new String[] {"i", "ii", "iii", "iv", "v", "1", "2", "3", "4", "5", "G1", "G2", "G3", "G4", "G5", "6", "7", "8", "9", "10"};
    PdfReader reader = new PdfReader(testFile.getAbsolutePath());
    String[] pageLabels = PdfPageLabels.getPageLabels(reader);
    Assert.assertNotNull(pageLabels);
    Assert.assertEquals(expectedPageLabels.length, pageLabels.length);
    for (int page = 0; page < pageLabels.length; page++) {
        Assert.assertEquals(expectedPageLabels[page], pageLabels[page]);
    }
    reader.close();
}