@Test
public void removeMiddlePages() throws IOException {

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