@Test
public void removeLastPages() throws IOException {

    PDDocument doc = new DocBuilder().withPages(5)
            .withPageLabelRange(0, "r")
            .withPageLabelRange(2, "D")
            .get();
    removePages(doc, asList(3, 4, 5), result -> {
        assertPageLabelIndexesAre(result, 0);
        assertPageLabelRangeIs(result, 0, "r");
    });
}